diff --git a/src/util/FFstrbuf.c b/src/util/FFstrbuf.c index bc6e3766f..9b8f7f41c 100644 --- a/src/util/FFstrbuf.c +++ b/src/util/FFstrbuf.c @@ -31,12 +31,6 @@ void ffStrbufInitCopy(FFstrbuf* strbuf, const FFstrbuf* src) static void setCapacity(FFstrbuf* strbuf, uint32_t capacity) { - if(capacity == 0) - { - ffStrbufDestroy(strbuf); - return; - } - if(strbuf->allocated == 0) { strbuf->chars = malloc(sizeof(*strbuf->chars) * capacity); @@ -535,6 +529,4 @@ void ffStrbufPutTo(const FFstrbuf* strbuf, FILE* file) void ffStrbufDestroy(FFstrbuf* strbuf) { free(strbuf->chars); - strbuf->allocated = 0; - ffStrbufClear(strbuf); }