diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2017-06-15 23:15:46 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-16 12:44:03 -0700 |
commit | 6a83d902073803c4141e02c53decf8c03e35da27 (patch) | |
tree | 209cf1639a325875240fce3e1f1cabbdb25878df /imap-send.c | |
parent | cf9f49ea4817b36e93e64909a918a912cc32c28b (diff) | |
download | git-6a83d902073803c4141e02c53decf8c03e35da27.tar.gz |
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 'imap-send.c')
-rw-r--r-- | imap-send.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/imap-send.c b/imap-send.c index 857591660f..40ddb496e6 100644 --- a/imap-send.c +++ b/imap-send.c @@ -776,8 +776,7 @@ static int get_cmd_result(struct imap_store *ctx, struct imap_cmd *tcmd) offsetof(struct imap_cmd, next)); if (cmdp->cb.data) { n = socket_write(&imap->buf.sock, cmdp->cb.data, cmdp->cb.dlen); - free(cmdp->cb.data); - cmdp->cb.data = NULL; + FREE_AND_NULL(cmdp->cb.data); if (n != (int)cmdp->cb.dlen) return RESP_BAD; } else if (cmdp->cb.cont) { |