diff options
| author | 2017-02-06 18:22:10 +0100 | |
|---|---|---|
| committer | 2017-02-06 18:22:10 +0100 | |
| commit | c98451f9eabb68df3dfabaedc9e5fee81fec2fd7 (patch) | |
| tree | 110c36fe1b3ce52ec7981b3d8856f875ef83aad6 | |
| parent | e17a493d51a69804836528983d24bbc1d75dd9e5 (diff) | |
| download | libplist-c98451f9eabb68df3dfabaedc9e5fee81fec2fd7.tar.gz libplist-c98451f9eabb68df3dfabaedc9e5fee81fec2fd7.tar.bz2 | |
bplist: Plug memory leak in case parsing a dictionary key fails
| -rw-r--r-- | src/bplist.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bplist.c b/src/bplist.c index ecc0684..81bd716 100644 --- a/src/bplist.c +++ b/src/bplist.c | |||
| @@ -444,6 +444,7 @@ static plist_t parse_dict_node(struct bplist_data *bplist, const char** bnode, u | |||
| 444 | 444 | ||
| 445 | if (plist_get_data(key)->type != PLIST_STRING) { | 445 | if (plist_get_data(key)->type != PLIST_STRING) { |
| 446 | PLIST_BIN_ERR("%s: dict entry %" PRIu64 ": invalid node type for key\n", __func__, j); | 446 | PLIST_BIN_ERR("%s: dict entry %" PRIu64 ": invalid node type for key\n", __func__, j); |
| 447 | plist_free(key); | ||
| 447 | plist_free(node); | 448 | plist_free(node); |
| 448 | return NULL; | 449 | return NULL; |
| 449 | } | 450 | } |
