mirror of
https://github.com/git/git.git
synced 2024-11-18 20:53:55 +01:00
Merge branch 'jc/mailinfo-cleanup-fix'
Corner case bugfix. * jc/mailinfo-cleanup-fix: mailinfo: avoid segfault when can't open files
This commit is contained in:
commit
46e915c42b
@ -1167,9 +1167,11 @@ void clear_mailinfo(struct mailinfo *mi)
|
||||
strbuf_release(&mi->inbody_header_accum);
|
||||
free(mi->message_id);
|
||||
|
||||
if (mi->p_hdr_data)
|
||||
for (i = 0; mi->p_hdr_data[i]; i++)
|
||||
strbuf_release(mi->p_hdr_data[i]);
|
||||
free(mi->p_hdr_data);
|
||||
if (mi->s_hdr_data)
|
||||
for (i = 0; mi->s_hdr_data[i]; i++)
|
||||
strbuf_release(mi->s_hdr_data[i]);
|
||||
free(mi->s_hdr_data);
|
||||
|
Loading…
Reference in New Issue
Block a user