Skip to content

Commit

Permalink
Fix memory leak when entering duplicate entries into the dictionary.
Browse files Browse the repository at this point in the history
  • Loading branch information
0-wiz-0 committed Aug 13, 2021
1 parent 0fe46a9 commit 3d68bc2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libfdproto/dictionary.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3d68bc2

Please sign in to comment.