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 --- builtin-repo-config.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'builtin-repo-config.c') diff --git a/builtin-repo-config.c b/builtin-repo-config.c index c416480208..6560cf1c2d 100644 --- a/builtin-repo-config.c +++ b/builtin-repo-config.c @@ -122,10 +122,8 @@ static int get_value(const char* key_, const char* regex_) ret = (seen == 1) ? 0 : 1; free_strings: - if (repo_config) - free(repo_config); - if (global) - free(global); + free(repo_config); + free(global); return ret; } -- cgit v1.2.3