diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-03-17 23:36:25 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-03-18 19:49:30 -0400 |
commit | 763c7aa288485cf5ab627fe1d25ff58e76f9dacb (patch) | |
tree | 563130863f8763af93df272c0122c76ef25aaba0 /src/journal/test-journal-match.c | |
parent | a50d7d4389217c0d3b527ee260eabf89e4a76caa (diff) |
journal,shared: add _cleanup_journal_close_
Diffstat (limited to 'src/journal/test-journal-match.c')
-rw-r--r-- | src/journal/test-journal-match.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/journal/test-journal-match.c b/src/journal/test-journal-match.c index fa228144f5..2ca2337c44 100644 --- a/src/journal/test-journal-match.c +++ b/src/journal/test-journal-match.c @@ -28,8 +28,8 @@ #include "log.h" int main(int argc, char *argv[]) { - sd_journal *j; - char *t; + sd_journal _cleanup_journal_close_ *j; + char _cleanup_free_ *t; log_set_max_level(LOG_DEBUG); @@ -59,9 +59,6 @@ int main(int argc, char *argv[]) { assert_se(streq(t, "((TWO=two AND (ONE=two OR ONE=one)) OR (PIFF=paff AND (QUUX=yyyyy OR QUUX=xxxxx OR QUUX=mmmm) AND (HALLO= OR HALLO=WALDO)))")); printf("resulting match expression is: %s\n", t); - free(t); - - sd_journal_close(j); return 0; } |