Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-28 08:19:39 +0400
committerJunio C Hamano <junkio@cox.net>2006-08-28 08:19:39 +0400
commit4cac42b1324951579036a9d3ac403f5c2c3eeed8 (patch)
tree5106e1aff2bd1d90fef4c26550b777dbe1142429 /builtin-repo-config.c
parentb3c952f8386cebe12fc95227866683bb1cec99a9 (diff)
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 'builtin-repo-config.c')
-rw-r--r--builtin-repo-config.c6
1 files changed, 2 insertions, 4 deletions
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;
}