diff options
Diffstat (limited to 'builtin/am.c')
| -rw-r--r-- | builtin/am.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/am.c b/builtin/am.c index d1990d7edc..bb36b42aa1 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -848,8 +848,10 @@ static int split_mail_stgit_series(struct am_state *state, const char **paths, series_dir = dirname(series_dir_buf); fp = fopen(*paths, "r"); - if (!fp) + if (!fp) { + free(series_dir_buf); return error_errno(_("could not open '%s' for reading"), *paths); + } while (!strbuf_getline_lf(&sb, fp)) { if (*sb.buf == '#') |
