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/cryptsetup/cryptsetup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/cryptsetup') diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 5c6c7c0ed8..74fa90a233 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -333,8 +333,7 @@ static int get_password(const char *vol, const char *src, usec_t until, bool acc /* If the description string is simply the * volume name, then let's not show this * twice */ - free(description); - description = NULL; + description = mfree(description); } if (mount_point && description) -- cgit v1.2.3-54-g00ecf