commit | ccd114f0f9d6bf9b11e5efc0127f7345f98356be | [log] [tgz] |
---|---|---|
author | Lennart Poettering <lennart@poettering.net> | Thu Oct 25 13:57:44 2018 +0200 |
committer | Lennart Poettering <lennart@poettering.net> | Thu Nov 08 09:52:16 2018 +0100 |
tree | 7431c5bc5fc644c6895b02b8a199cdb086e75ec9 | |
parent | 81fa4479f8bb469959c93f7aa15c9331d9683240 [diff] [blame] |
tmpfiles: fix minor memory leak on error path
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 67060e5..cc5cbc3 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c
@@ -2792,8 +2792,10 @@ return log_oom(); r = ordered_hashmap_put(h, i.path, existing); - if (r < 0) + if (r < 0) { + free(existing); return log_oom(); + } } if (!GREEDY_REALLOC(existing->items, existing->allocated, existing->n_items + 1))