summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2014-07-24 00:42:39 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-07-24 13:57:50 -0700
commit649409b7bccdcd6d6e5273b2b7340cea05f77736 (patch)
treefaa5aa7250f73b18ce9e08b044f726f9c9bb7e21 /.gitignore
parenttransport: fix leaks in refs_from_alternate_cb (diff)
downloadtgif-649409b7bccdcd6d6e5273b2b7340cea05f77736.tar.xz
fix memory leak parsing core.commentchar
When we see the core.commentchar config option, we extract the string with git_config_string, which does two things: 1. It complains via config_error_nonbool if there is no string value. 2. It makes a copy of the string. Since we immediately parse the string into its single-character value, we only care about (1). And in fact (2) is a detriment, as it means we leak the copy. Instead, let's just check the pointer value ourselves, and parse directly from the const string we already have. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions