Skip to content

Commit f0b5678

Browse files
committed
Merge branch 'ab/mailmap-leakfix'
Leakfix. * ab/mailmap-leakfix: mailmap.c: fix a memory leak in free_mailap_{info,entry}()
2 parents 02d2632 + ccdd5d1 commit f0b5678

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mailmap.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ static void free_mailmap_info(void *p, const char *s)
3737
s, debug_str(mi->name), debug_str(mi->email));
3838
free(mi->name);
3939
free(mi->email);
40+
free(mi);
4041
}
4142

4243
static void free_mailmap_entry(void *p, const char *s)
@@ -52,6 +53,7 @@ static void free_mailmap_entry(void *p, const char *s)
5253

5354
me->namemap.strdup_strings = 1;
5455
string_list_clear_func(&me->namemap, free_mailmap_info);
56+
free(me);
5557
}
5658

5759
/*

0 commit comments

Comments
 (0)