diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2017-06-16 01:15:46 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-16 21:44:03 +0200 |
commit | 6a83d902073803c4141e02c53decf8c03e35da27 (patch) | |
tree | 209cf1639a325875240fce3e1f1cabbdb25878df /config.c | |
parent | coccinelle: add a rule to make "type" code use FREE_AND_NULL() (diff) | |
download | git-6a83d902073803c4141e02c53decf8c03e35da27.tar.xz git-6a83d902073803c4141e02c53decf8c03e35da27.zip |
coccinelle: make use of the "type" FREE_AND_NULL() rule
Apply the result of the just-added coccinelle rule. This manually
excludes a few occurrences, mostly things that resulted in many
FREE_AND_NULL() on one line, that'll be manually fixed in a subsequent
change.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -395,8 +395,7 @@ static int git_config_parse_key_1(const char *key, char **store_key, int *basele out_free_ret_1: if (store_key) { - free(*store_key); - *store_key = NULL; + FREE_AND_NULL(*store_key); } return -CONFIG_INVALID_KEY; } |