diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2018-07-20 21:51:36 +0100 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2018-10-26 14:35:16 +0200 |
commit | 49011d32deca7a2d2a3c6ceff3918ce634e270ce (patch) | |
tree | 40b99075c15b4f1638d5aa1f3d264e3e83c6e807 | |
parent | 49ee0ae6ff1621d3093947c08868f4a4aeb56a91 (diff) | |
download | libgit2-49011d32deca7a2d2a3c6ceff3918ce634e270ce.tar.gz |
push tests: deeply free the push status
Don't just free the push status structure, actually free the strings that were
strdup'd into the struct as well.
(cherry picked from commit dad9988121521ccc2ffff39299ca98dba160b857)
-rw-r--r-- | tests/online/push.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/online/push.c b/tests/online/push.c index f72b4f8cb..cdfb5a64e 100644 --- a/tests/online/push.c +++ b/tests/online/push.c @@ -152,8 +152,12 @@ static void do_verify_push_status(record_callbacks_data *data, const push_status git_buf_free(&msg); } - git_vector_foreach(actual, i, iter) - git__free(iter); + git_vector_foreach(actual, i, iter) { + push_status *s = (push_status *)iter; + git__free(s->ref); + git__free(s->msg); + git__free(s); + } git_vector_free(actual); } |