Commit Diff


commit - 4f46fcf8880d657db0e339f7e3f0c72dc1dad27a
commit + 4ad67b987e6aa51b472d9569815181965b765ee3
blob - efec5237009bdecf625d541301078dad8e089c1d
blob + 909e0630a41461a27ffa9e8dd02d673281d4e527
--- lib/pack.c
+++ lib/pack.c
@@ -1643,6 +1643,10 @@ got_pack_dump_delta_chain_to_file(size_t *result_size,
 
 done:
 	free(base_buf);
+	if (err) {
+		free(accum_buf);
+		accum_buf = NULL;
+	}
 	if (accum_buf) {
 		size_t len = fwrite(accum_buf, 1, accum_size, outfile);
 		free(accum_buf);