]> git.proxmox.com Git - libgit2.git/commitdiff
pack-objects: fix memory leak in compute_write_order
authorPatrick Steinhardt <ps@pks.im>
Tue, 9 Feb 2016 09:43:28 +0000 (10:43 +0100)
committerPatrick Steinhardt <ps@pks.im>
Tue, 9 Feb 2016 09:43:28 +0000 (10:43 +0100)
src/pack-objects.c

index fd181fc5ee726d52ce1fe201279d7eaa6418fe7c..3046d941dc019ff1245b463a102098b8d639da38 100644 (file)
@@ -605,6 +605,7 @@ static git_pobject **compute_write_order(git_packbuilder *pb)
        }
 
        if (wo_end != pb->nr_objects) {
+               git__free(wo);
                giterr_set(GITERR_INVALID, "invalid write order");
                return NULL;
        }