From 25f83f36ee204dabd5a3c780dc17eb7adde5c827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Fri, 6 Dec 2013 21:46:46 +0100 Subject: [PATCH] debugging aid to uc_dstr_destroy too --- src/dstr.c | 7 +++++++ 1 file changed, 7 insertions(+) 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); }