]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-util: fix a memleak
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 3 Jun 2015 17:49:04 +0000 (19:49 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 3 Jun 2015 17:50:02 +0000 (19:50 +0200)
src/test/test-util.c

index 7a398fafbe45befdf278649e6ca1c19ef4f03659..9d5516a18d3e1d675270ca2dd05b70b8e5f6c1ee 100644 (file)
@@ -460,6 +460,8 @@ static void test_cunescape(void) {
         assert_se(cunescape("\\u0000", 0, &unescaped) < 0);
         assert_se(cunescape("\\u00DF\\U000000df\\u03a0\\U00000041", UNESCAPE_RELAX, &unescaped) >= 0);
         assert_se(streq_ptr(unescaped, "ßßΠA"));
+        free(unescaped);
+        unescaped = NULL;
 
         assert_se(cunescape("\\073", 0, &unescaped) >= 0);
         assert_se(streq_ptr(unescaped, ";"));