git » libjio » commit b362314

Unconditionally free() some pointers

author Alberto Bertogli
2009-06-26 06:01:29 UTC
committer Alberto Bertogli
2009-06-26 06:01:29 UTC
parent aa47917d0c825011c35c3190c81ec00f9e5f62f7

Unconditionally free() some pointers

free(NULL) is perfectly valid, so there is no need to check for it.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

libjio/journal.c +2 -4

diff --git a/libjio/journal.c b/libjio/journal.c
index be9e04b..b059eee 100644
--- a/libjio/journal.c
+++ b/libjio/journal.c
@@ -196,10 +196,8 @@ unlink_error:
 	close(fd);
 
 error:
-	if (name)
-		free(name);
-	if (jop)
-		free(jop);
+	free(name);
+	free(jop);
 
 	return NULL;
 }