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/core/snapshot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/snapshot.c') diff --git a/src/core/snapshot.c b/src/core/snapshot.c index 1e634b9bc1..9518e21f36 100644 --- a/src/core/snapshot.c +++ b/src/core/snapshot.c @@ -217,8 +217,7 @@ int snapshot_create(Manager *m, const char *name, bool cleanup, sd_bus_error *e, break; } - free(n); - n = NULL; + n = mfree(n); } } -- cgit v1.2.3-54-g00ecf