Skip to content

Commit bbf4b41

Browse files
Nicolas PitreJunio C Hamano
authored andcommitted
Plug memory leak in index-pack collision checking codepath.
1 parent a8f4ef7 commit bbf4b41

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

index-pack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ static void sha1_object(const void *data, unsigned long size,
358358
if (size != has_size || type != has_type ||
359359
memcmp(data, has_data, size) != 0)
360360
die("SHA1 COLLISION FOUND WITH %s !", sha1_to_hex(sha1));
361+
free(has_data);
361362
}
362363
}
363364

0 commit comments

Comments
 (0)