From 4cac42b1324951579036a9d3ac403f5c2c3eeed8 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 27 Aug 2006 21:19:39 -0700 Subject: free(NULL) is perfectly valid. Jonas noticed some places say "if (X) free(X)" which is totally unnecessary. Signed-off-by: Junio C Hamano --- fetch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fetch.c') diff --git a/fetch.c b/fetch.c index ef60b045ea..7d3812c406 100644 --- a/fetch.c +++ b/fetch.c @@ -302,8 +302,7 @@ int pull(int targets, char **target, const char **write_ref, if (ret) goto unlock_and_fail; } - if (msg) - free(msg); + free(msg); return 0; -- cgit v1.2.3