From 97b11eedff9d2e17101ad453caf9e48b73246719 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Fri, 31 Jul 2015 19:56:38 +0200 Subject: tree-wide: introduce mfree() Pretty trivial helper which wraps free() but returns NULL, so we can simplify this: free(foobar); foobar = NULL; to this: foobar = mfree(foobar); --- src/journal/journalctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/journal/journalctl.c') diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 073cc77711..355c4f1ee3 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -1259,8 +1259,7 @@ static int add_units(sd_journal *j) { } } - strv_free(patterns); - patterns = NULL; + patterns = strv_free(patterns); STRV_FOREACH(i, arg_user_units) { _cleanup_free_ char *u = NULL; -- cgit v1.2.3-54-g00ecf