Skip to contentSkip to conversation

transport.c::get_refs_via_curl(): do not leak refs_url

PATCH In review Tay Ray Chuan 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 12/23 transport.c::get_refs_via_curl(): do not leak refs_url

From: Mike Hommey <[email protected]>
Subject: [WIP Patch 02/12] Some cleanup in get_refs_via_curl()
Date: Sun, 18 Jan 2009 09:04:27 +0100

---
 transport.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
transport.c +1 -0
index efecb65..9edd5aa 100644
@@ -519,6 +519,7 @@ static struct ref *get_refs_via_curl(struct transport *transport, int for_push)
 		free(ref);
 	}
 
+	free(refs_url);
 	return refs;
 }
 

--
1.6.3.1

#1 lore raw
Quoted 2 lines · Tay Ray Chuan

From: Mike Hommey <[email protected]>
Subject: [WIP Patch 02/12] Some cleanup in get_refs_via_curl()

So what is the title of this patch? "transport.c::get_refs_via_curl():
do not leak refs_url" or "Some cleanup in get_refs_via_curl()"?

Perhaps it should be "transport.c: Do not leak refs_url in get_refs_via_curl()"...?

Quoted 23 lines

Date: Sun, 18 Jan 2009 09:04:27 +0100

---
 transport.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
transport.c +1 -1
index efecb65..9edd5aa 100644
@@ -519,6 +519,7 @@ static struct ref *get_refs_via_curl(struct transport *transport, int for_push)
 		free(ref);
 	}
 
+	free(refs_url);
 	return refs;
 }
 
--

1.6.3.1

Signature · 3 lines
Jakub Narebski
Poland
ShadeHawk on #git
#2 lore raw

Hi,

Quoted 5 lines · Jakub Narebski
Quoted 2 lines

From: Mike Hommey <[email protected]>
Subject: [WIP Patch 02/12] Some cleanup in get_refs_via_curl()

So what is the title of this patch? "transport.c::get_refs_via_curl():
do not leak refs_url" or "Some cleanup in get_refs_via_curl()"?

See my reply to patch #19.

Quoted 2 lines

Perhaps it should be "transport.c: Do not leak refs_url in get_refs_via_curl()"...?

I think it's a matter of preference. I'll put them side-by-side to demonstrate this better:

transport.c: Do not leak refs_url in get_refs_via_curl() transport.c::get_refs_via_curl(): do not leak refs_url

There isn't any important difference between the two other than form.

Signature · 2 lines
Cheers,
Ray Chuan