Code

Plug memory leak in index-pack collision checking codepath.
authorNicolas Pitre <nico@cam.org>
Tue, 3 Apr 2007 16:33:46 +0000 (12:33 -0400)
committerJunio C Hamano <junkio@cox.net>
Wed, 4 Apr 2007 02:04:56 +0000 (19:04 -0700)
index-pack.c

index 6284fe3760465cceccfa7fb1580a8652761f35b6..3c768fbc631387b59bbbae3423b65b6a311a702b 100644 (file)
@@ -358,6 +358,7 @@ static void sha1_object(const void *data, unsigned long size,
                if (size != has_size || type != has_type ||
                    memcmp(data, has_data, size) != 0)
                        die("SHA1 COLLISION FOUND WITH %s !", sha1_to_hex(sha1));
+               free(has_data);
        }
 }