Commit Diff


commit - 49541807dc224979ed6ac6cb35636f35f41d1f71
commit + cddff777c2bb2cbb221871f5fe45bbbcecb4c84c
blob - 1ca39a72c12f0bce3c5d7e3d226cc9c091e0f36c
blob + a6f40357af86725163aaec0415fa2792e366fd8d
--- lib/fetch.c
+++ lib/fetch.c
@@ -494,6 +494,8 @@ got_fetch_pack(struct got_object_id **pack_hash, struc
 		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);
@@ -528,6 +530,7 @@ done:
 	free(tmppackpath);
 	free(tmpidxpath);
 	free(idxpath);
+	free(id_str);
 	free(packpath);
 	free(progress);