Commit 17259bfa94068499f61aec3129c47ae2671bd531

Stefan Sperling 2022-05-19T09:26:13

plug a small memleak on error in got_pack_create()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/pack_create.c b/lib/pack_create.c
index 71ea8bf..5415448 100644
--- a/lib/pack_create.c
+++ b/lib/pack_create.c
@@ -1946,7 +1946,7 @@ got_pack_create(uint8_t *packsha1, FILE *packfile,
 	    ntheirs, ours, nours, repo, loose_obj_only,
 	    progress_cb, progress_arg, &rl, cancel_cb, cancel_arg);
 	if (err)
-		return err;
+		goto done;
 
 	if (progress_cb) {
 		err = progress_cb(progress_arg, ncolored, nfound, ntrees,