[PATCH 07/18] Some cleanup in get_refs_via_curl()

Subsystems: the rest

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH 07/18] Some cleanup in get_refs_via_curl()

From: Tay Ray Chuan <hidden>
Date: 2016-06-15 22:46:49

Signed-off-by: Mike Hommey <redacted>
Signed-off-by: Tay Ray Chuan <redacted>
---
 transport.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/transport.c b/transport.c
index 89d846e..b7c1c39 100644
--- a/transport.c
+++ b/transport.c
@@ -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

Re: [PATCH 07/18] Some cleanup in get_refs_via_curl()

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:49

Tay Ray Chuan [off-list ref] writes:
Signed-off-by: Mike Hommey <redacted>
Signed-off-by: Tay Ray Chuan <redacted>
The same comment as 06/18 on attribution apllies.

Be specific when you can without going to too verbose.  In this case,
instead of wasting two meaningless words "Some cleanup", you can say:

	Subject: transport.c::get_refs_via_curl(): do not leak refs_url
quoted hunk
 transport.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/transport.c b/transport.c
index 89d846e..b7c1c39 100644
--- a/transport.c
+++ b/transport.c
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help