Re: [PATCH 05/12] index-pack: parse v4 header and dictionaries
- From
Nicolas Pitre <nico@fluxnic.net>
- Date
- Sep 8, 2013, 02:14 UTC
- Message-ID
- <alpine.LFD.2.03.1309072211050.20709@syhkavp.arg>
- In-Reply-To
- <1378550599-25365-6-git-send-email-pclouds@gmail.com>
On Sat, 7 Sep 2013, Nguyễn Thái Ngọc Duy wrote:
> > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> > ---
[...]
Show 13 quoted lines
> @@ -1677,6 +1727,15 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix)
> free(objects);
> free(index_name_buf);
> free(keep_name_buf);
> + free(sha1_table);
> + if (name_dict) {
> + free((void*)name_dict->data);
> + free(name_dict);
> + }
> + if (path_dict) {
> + free((void*)path_dict->data);
> + free(path_dict);
> + }The freeing of dictionary tables should probably have its own function in packv4-parse.c. and a call to it added in free_pack_by_name() as well.
Nicolas