plug a memory leak in got_fetch_pack(); patch by Mikhail
diff --git a/lib/fetch.c b/lib/fetch.c
index e557ed1..c6a947c 100644
--- a/lib/fetch.c
+++ b/lib/fetch.c
@@ -500,6 +500,8 @@ got_fetch_pack(struct got_object_id **pack_hash, struct got_pathlist_head *refs,
err = got_error_from_errno("asprintf");
goto done;
}
+ free(id_str);
+ id_str = NULL;
if (rename(tmppackpath, packpath) == -1) {
err = got_error_from_errno3("rename", tmppackpath, packpath);
@@ -534,6 +536,7 @@ done:
free(tmppackpath);
free(tmpidxpath);
free(idxpath);
+ free(id_str);
free(packpath);
free(progress);