summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonny Chevalier <chevalier.ronny@gmail.com>2015-04-09 11:00:35 +0200
committerRonny Chevalier <chevalier.ronny@gmail.com>2015-04-09 18:47:52 +0200
commitcd977dca10a9c6ce29a4720914718c74c3b84a76 (patch)
tree24495038260fe2100ccaea4e48781df50f4025a1
parent019c7fba754f74909bdb8bbbbbbe529082928a95 (diff)
util: cunescape - fix memleak in error path
-rw-r--r--src/shared/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index 3a80f264ca..23468b7af6 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -1505,6 +1505,7 @@ int cunescape_length_with_prefix(const char *s, size_t length, const char *prefi
continue;
}
+ free(r);
return -EINVAL;
}
@@ -1516,6 +1517,7 @@ int cunescape_length_with_prefix(const char *s, size_t length, const char *prefi
continue;
}
+ free(r);
return k;
}