debugging aid to uc_dstr_destroy too

This commit is contained in:
Nils O. Selåsdal
2013-12-06 21:46:46 +01:00
parent e679ad969d
commit 25f83f36ee
+7
View File
@@ -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);
}