diff --git a/libfdproto/dictionary.c b/libfdproto/dictionary.c index 94765554..c284c7bc 100644 --- a/libfdproto/dictionary.c +++ b/libfdproto/dictionary.c @@ -1860,6 +1860,8 @@ int fd_dict_new ( struct dictionary * dict, enum dict_object_type type, void * d free(buf); } error_free: + /* we can use destroy_object because this object is not part of the dictionary */ + destroy_object_data(new); free(new); return ret; }