diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-03-17 18:29:34 +0100 |
---|---|---|
committer | Nika Layzell <nika@thelayzells.com> | 2018-06-14 22:43:27 -0700 |
commit | 59fbf9cfb0633f2968a8d397074456bfbbef0cad (patch) | |
tree | 474e1887b13946c9fbc0e0c7e32960d859f26fe5 | |
parent | 97bc898828f8a281f292cef8913e6ec2dc13eef9 (diff) | |
download | libgit2-59fbf9cfb0633f2968a8d397074456bfbbef0cad.tar.gz |
mailmap: Don't return a freed pointer, even if we return an error code
-rw-r--r-- | src/mailmap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mailmap.c b/src/mailmap.c index 54ef72066..850b566ce 100644 --- a/src/mailmap.c +++ b/src/mailmap.c @@ -214,8 +214,10 @@ int git_mailmap_parse( cleanup: if (entry) git__free(entry); - if (error < 0 && *mailmap) + if (error < 0 && *mailmap) { git_mailmap_free(*mailmap); + *mailmap = NULL; + } return error; } |