diff options
Diffstat (limited to 'builtin/mailinfo.c')
-rw-r--r-- | builtin/mailinfo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c index e7edd743ce..a0416610c9 100644 --- a/builtin/mailinfo.c +++ b/builtin/mailinfo.c @@ -12,7 +12,6 @@ static FILE *cmitmsg, *patchfile, *fin, *fout; static int keep_subject; static int keep_non_patch_brackets_in_subject; static const char *metainfo_charset; -static struct strbuf line = STRBUF_INIT; static struct strbuf name = STRBUF_INIT; static struct strbuf email = STRBUF_INIT; static char *message_id; @@ -964,6 +963,8 @@ static void handle_info(void) static int mailinfo(FILE *in, FILE *out, const char *msg, const char *patch) { int peek; + struct strbuf line = STRBUF_INIT; + fin = in; fout = out; @@ -995,7 +996,7 @@ static int mailinfo(FILE *in, FILE *out, const char *msg, const char *patch) fclose(patchfile); handle_info(); - + strbuf_release(&line); return 0; } |