summaryrefslogtreecommitdiff
path: root/interpolate.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-27 21:03:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-27 21:03:50 (GMT)
commit3d0a936f63f2f894b3986d96cdd8f2baae96150c (patch)
treef661256c3756d9d74ea2cd045115e5488f53388f /interpolate.c
parent60b188a9844cdcf865174c685a38acc053a9d43b (diff)
parent8e0f70033b2bd1679a6e5971978fdc3ee09bdb72 (diff)
downloadgit-3d0a936f63f2f894b3986d96cdd8f2baae96150c.zip
git-3d0a936f63f2f894b3986d96cdd8f2baae96150c.tar.gz
git-3d0a936f63f2f894b3986d96cdd8f2baae96150c.tar.bz2
Merge branch 'jm/free'
* jm/free: Avoid unnecessary "if-before-free" tests. Conflicts: builtin-branch.c
Diffstat (limited to 'interpolate.c')
-rw-r--r--interpolate.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/interpolate.c b/interpolate.c
index 6ef53f2..7f03bd9 100644
--- a/interpolate.c
+++ b/interpolate.c
@@ -11,8 +11,7 @@ void interp_set_entry(struct interp *table, int slot, const char *value)
char *oldval = table[slot].value;
char *newval = NULL;
- if (oldval)
- free(oldval);
+ free(oldval);
if (value)
newval = xstrdup(value);