summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index d392ffe..9177fda 100644
--- a/src/util.c
+++ b/src/util.c
@@ -152,8 +152,7 @@ update_sha1 (struct stat const *st, char const *sha1)
if (! p)
p = __insert_file_id (st, UNKNOWN);
else
- if (p->sha1)
- free (p->sha1);
+ free (p->sha1);
p->sha1 = sha1 ? xstrdup (sha1) : 0;
}