summaryrefslogtreecommitdiff
path: root/fetch.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-28 04:19:39 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-08-28 04:19:39 (GMT)
commit4cac42b1324951579036a9d3ac403f5c2c3eeed8 (patch)
tree5106e1aff2bd1d90fef4c26550b777dbe1142429 /fetch.c
parentb3c952f8386cebe12fc95227866683bb1cec99a9 (diff)
downloadgit-4cac42b1324951579036a9d3ac403f5c2c3eeed8.zip
git-4cac42b1324951579036a9d3ac403f5c2c3eeed8.tar.gz
git-4cac42b1324951579036a9d3ac403f5c2c3eeed8.tar.bz2
free(NULL) is perfectly valid.
Jonas noticed some places say "if (X) free(X)" which is totally unnecessary. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'fetch.c')
-rw-r--r--fetch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fetch.c b/fetch.c
index ef60b04..7d3812c 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;