From: Brandon Casey Date: Sat, 08 Oct 2011 03:20:22 GMT Subject: [PATCH 3/3] refs.c: free duplicate entries in the ref array instead of leaking them Message-ID: <5WORKOGzj9pUA6-WazYHWrx23BzZNuzssM-BrpbAt7jziy1qExfJm7by5NnJUMOk6ewCveYCPmzYGScMzowqtqJ8RZ9pZP6PRSU69BNSzr2gzdZ7nKtDsZyIEWyAD9p9GiIdHbxCa0M@cipher.nrlssc.navy.mil> In-Reply-To: <3k7giKa3PkJZo51iAXivXCFEZpYY2WC3depjtuvksrCQPax7dSLVCXpMlqLxWtZfSp6P10yMhMg@cipher.nrlssc.navy.mil> From: Brandon Casey Signed-off-by: Brandon Casey --- refs.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/refs.c b/refs.c index cbc4c5d..df39297 100644 --- a/refs.c +++ b/refs.c @@ -94,6 +94,7 @@ static void sort_ref_array(struct ref_array *array) die("Duplicated ref, and SHA1s don't match: %s", a->name); warning("Duplicated ref: %s", a->name); + free(b); continue; } i++; -- 1.7.7