coccinelle: make use of the "type" FREE_AND_NULL() rule
[gitweb.git] / transport.c
index 9bfcf870f9078f75349bd3b4976c71bbf5c49ebf..cf3508800132b8843d8dcad3f34f25feb593474b 100644 (file)
@@ -1145,8 +1145,7 @@ void transport_unlock_pack(struct transport *transport)
 {
        if (transport->pack_lockfile) {
                unlink_or_warn(transport->pack_lockfile);
-               free(transport->pack_lockfile);
-               transport->pack_lockfile = NULL;
+               FREE_AND_NULL(transport->pack_lockfile);
        }
 }