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>
This commit is contained in:

committed by
Junio C Hamano

parent
cf9f49ea48
commit
6a83d90207
@ -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) {
|
||||
|
Reference in New Issue
Block a user