diff options
author | Ronny Chevalier <chevalier.ronny@gmail.com> | 2015-04-09 11:00:35 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 07:54:16 +0100 |
commit | 0bc6e4a841334d1d146032c9520b6ce0437c219e (patch) | |
tree | e38dcd09493cd9843de790e60e2e07acfd3b0f5b /src | |
parent | 6c00c6cee5a32b6af0e4c589d74c6974be50aa20 (diff) |
util: cunescape - fix memleak in error path
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index ffde3ff8f..ab891fa2c 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -1525,6 +1525,7 @@ int cunescape_length_with_prefix(const char *s, size_t length, const char *prefi continue; } + free(r); return -EINVAL; } @@ -1536,6 +1537,7 @@ int cunescape_length_with_prefix(const char *s, size_t length, const char *prefi continue; } + free(r); return k; } |