diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2021-09-02 22:36:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-02 22:36:46 -0400 |
commit | a88fdda676b5f58f0ccec69a67f32d710d4676e8 (patch) | |
tree | 57de85537333cc610708b08dcfb130e2523e5a9d | |
parent | 4fd32be01c79a5c003bb47674ac1d76d948518b7 (diff) | |
parent | 27f50a66124054518d5febe984bccad02ee0846b (diff) | |
download | libgit2-a88fdda676b5f58f0ccec69a67f32d710d4676e8.tar.gz |
Merge pull request #6029 from arroz/fix_6028
#6028: Check if `threadstate->error_t.message` is not `git_buf__initbuf` before freeing.
-rw-r--r-- | src/threadstate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/threadstate.c b/src/threadstate.c index 6031e8280..e2c08975f 100644 --- a/src/threadstate.c +++ b/src/threadstate.c @@ -36,7 +36,8 @@ static void threadstate_dispose(git_threadstate *threadstate) if (!threadstate) return; - git__free(threadstate->error_t.message); + if (threadstate->error_t.message != git_buf__initbuf) + git__free(threadstate->error_t.message); threadstate->error_t.message = NULL; } |