diff --git a/src/dstr.c b/src/dstr.c index 9c12e8a..a9ddf4d 100644 --- a/src/dstr.c +++ b/src/dstr.c @@ -14,6 +14,13 @@ void uc_dstr_init(struct DStr *str) void uc_dstr_destroy(struct DStr *str) { +#ifdef DEBUG + if (str->str) { + memset(str->str, 0xcc, str->allocated); + } + str->len = -1; + str->allocated = -1; +#endif free(str->str); }