summaryrefslogtreecommitdiff
path: root/bittorrent/mbtstr/src/dtor.c
blob: af35c9e9179f4280d58513720eedde2cdcb88841 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdbool.h>
#include <stdlib.h>

#include "mbtstr/str.h"

void mbt_str_dtor(struct mbt_str *str)
{
    if (str->data != NULL)
    {
        free(str->data);
        str->data = NULL;
    }
    str->size = 0;
    str->capacity = 0;
}