summaryrefslogtreecommitdiff
path: root/builtin/tag.c
diff options
context:
space:
mode:
authorLibravatar Martin Ågren <martin.agren@gmail.com>2017-10-01 19:42:08 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-10-02 13:03:10 +0900
commit886e1084d78cda218b4d1133e8154e8556f92222 (patch)
tree2114089d84f6112c5bca73b3360fce8c820f25ab /builtin/tag.c
parentGit 2.14.2 (diff)
downloadtgif-886e1084d78cda218b4d1133e8154e8556f92222.tar.xz
builtin/: add UNLEAKs
Add some UNLEAKs where we are about to return from `cmd_*`. UNLEAK the variables in the same order as we've declared them. While addressing `msg` in builtin/tag.c, convert the existing `strbuf_release()` calls as well. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/tag.c')
-rw-r--r--builtin/tag.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/builtin/tag.c b/builtin/tag.c
index 7a70d5a9bb..14d1583cff 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -552,9 +552,10 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
if (force && !is_null_oid(&prev) && oidcmp(&prev, &object))
printf(_("Updated tag '%s' (was %s)\n"), tag, find_unique_abbrev(prev.hash, DEFAULT_ABBREV));
- strbuf_release(&err);
- strbuf_release(&buf);
- strbuf_release(&ref);
- strbuf_release(&reflog_msg);
+ UNLEAK(buf);
+ UNLEAK(ref);
+ UNLEAK(reflog_msg);
+ UNLEAK(msg);
+ UNLEAK(err);
return 0;
}