git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: [PATCH] Fix leak in diffcore-order.c
Date: Sat, 28 May 2005 09:44:57 -0700	[thread overview]
Message-ID: <7vekbruwom.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <7vzmufwu8w.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Sat, 28 May 2005 02:54:39 -0700")

A temporary array used for sorting the filepairs were not freed
after use.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---

diffcore-order.c |    1 +
1 files changed, 1 insertion(+)

diff --git a/diffcore-order.c b/diffcore-order.c
--- a/diffcore-order.c
+++ b/diffcore-order.c
@@ -117,5 +117,6 @@ void diffcore_order(const char *orderfil
 	qsort(o, q->nr, sizeof(*o), compare_pair_order);
 	for (i = 0; i < q->nr; i++)
 		q->queue[i] = o[i].pair;
+	free(o);
 	return;
 }
------------------------------------------------


  parent reply	other threads:[~2005-05-28 16:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-28  9:54 [PATCH] Add -O<orderfile> option to diff-* brothers Junio C Hamano
2005-05-28  9:53 ` [PATCH] Pickaxe fixes Junio C Hamano
2005-05-28 10:59   ` Thomas Glanzmann
2005-05-28 16:16     ` Junio C Hamano
2005-05-28 16:22       ` Thomas Glanzmann
2005-05-30  7:35         ` Junio C Hamano
2005-05-28 11:12 ` [PATCH] Add -O<orderfile> option to diff-* brothers Petr Baudis
2005-05-28 11:19   ` Thomas Glanzmann
2005-05-28 16:25     ` Junio C Hamano
2005-05-28 16:14   ` Junio C Hamano
2005-05-28 16:44 ` Junio C Hamano [this message]
2005-05-29 18:56 ` Linus Torvalds
2005-05-29 20:32   ` Junio C Hamano
2005-05-30  0:23   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vekbruwom.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).