Skip to content

Commit

Permalink
rfc2231: fix memleak
Browse files Browse the repository at this point in the history
Found by clang 7.0.1.
  • Loading branch information
leahneukirchen committed Feb 10, 2019
1 parent 6ea3248 commit cb0ffbf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rfc2231.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ blaze822_mime2231_parameter(char *s, char *name,
if (!srcenc)
return 0;
sbuf = strchr(sbuf+1, '\'');
if (!sbuf)
if (!sbuf) {
free(srcenc);
return 0;
}
sbuf++;
}
while (sbuf < ebuf && dst < dstend) {
Expand Down

0 comments on commit cb0ffbf

Please sign in to comment.