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>
This commit is contained in:
Junio C Hamano
2006-08-27 21:19:39 -07:00
parent b3c952f838
commit 4cac42b132
10 changed files with 21 additions and 44 deletions

View File

@ -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;