Thread (1 message) 1 message, 1 author, 2016-06-15
DORMANTno replies

[PATCH 2/2] apply: free patch->result

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:21
Subsystem: the rest · Maintainer: Linus Torvalds

This is by far the largest piece of data, much larger than the patch and
fragment structures or the three name fields in the patch structure.

Signed-off-by: Junio C Hamano <redacted>
---
I have not finished auditing all the codepaths, so this change needs to be
eyeballed carefully. We may be pointing an unfreeable piece of memory or a
piece of memory that belong to other structures that are going to be freed
otherwise.

 builtin/apply.c |    1 +
 1 file changed, 1 insertion(+)
diff --git a/builtin/apply.c b/builtin/apply.c
index 5d03e50..c919db3 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -212,6 +212,7 @@ static void free_patch(struct patch *patch)
 		free(patch->def_name);
 		free(patch->old_name);
 		free(patch->new_name);
+		free(patch->result);
 		free(patch);
 		patch = patch_next;
 	}
-- 
1.7.10.rc1.76.g1a8310
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help