aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index-pack.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/index-pack.c b/index-pack.c
index 60173d519..2f149a40f 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -815,6 +815,10 @@ int main(int argc, char **argv)
free(objects);
free(index_name_buf);
free(keep_name_buf);
+ if (pack_name == NULL)
+ free(curr_pack);
+ if (index_name == NULL)
+ free(curr_index);
return 0;
}