chiark / gitweb /
journal/tests: free allocated memory in test
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 6 Mar 2013 02:43:06 +0000 (21:43 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 6 Mar 2013 02:43:06 +0000 (21:43 -0500)
src/journal/test-journal-syslog.c

index 5cf940733bbf2d79477d566c00b3209c35c9fbf6..895975caa5b52624a0a652a4f810d954f2d8923d 100644 (file)
@@ -25,7 +25,7 @@
 static void test_syslog_parse_identifier(const char* str,
                                          const char *ident, const char*pid, int ret) {
         const char *buf = str;
 static void test_syslog_parse_identifier(const char* str,
                                          const char *ident, const char*pid, int ret) {
         const char *buf = str;
-        char *ident2 = NULL, *pid2 = NULL;
+        char _cleanup_free_ *ident2 = NULL, *pid2 = NULL;
         int ret2;
 
         ret2 = syslog_parse_identifier(&buf, &ident2, &pid2);
         int ret2;
 
         ret2 = syslog_parse_identifier(&buf, &ident2, &pid2);