diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2018-07-20 21:51:36 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-07-20 13:57:25 -0700 |
commit | dad9988121521ccc2ffff39299ca98dba160b857 (patch) | |
tree | 4830026e7c4b12c42af287d8bb7437b604031409 | |
parent | ca2eb4608243162a13c427e74526b6422d5a6659 (diff) | |
download | libgit2-dad9988121521ccc2ffff39299ca98dba160b857.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.
-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 000e48104..257da27ad 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_dispose(&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); } |