summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4049b9c)
raw | patch | inline | side by side (parent: 4049b9c)
author | Nicolas Pitre <nico@cam.org> | |
Wed, 17 Oct 2007 01:55:50 +0000 (21:55 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 17 Oct 2007 06:54:57 +0000 (02:54 -0400) |
Now that some pointers have lost their const attribute, we can free their
associated memory when done with them. This is more a correctness issue
about the rule for freeing those pointers which isn't completely trivial
more than the leak itself which didn't matter as the program is
exiting anyway.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
associated memory when done with them. This is more a correctness issue
about the rule for freeing those pointers which isn't completely trivial
more than the leak itself which didn't matter as the program is
exiting anyway.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
index-pack.c | patch | blob | history |
diff --git a/index-pack.c b/index-pack.c
index 60173d51925dd67d0816eb821c9600e02d3c232c..2f149a40fdc40a84d33420fc363fbf7edafe1712 100644 (file)
--- a/index-pack.c
+++ b/index-pack.c
free(objects);
free(index_name_buf);
free(keep_name_buf);
+ if (pack_name == NULL)
+ free(curr_pack);
+ if (index_name == NULL)
+ free(curr_index);
return 0;
}