repository: use FREE_AND_NULL
authorRené Scharfe <l.s.r@web.de>
Sun, 1 Oct 2017 14:44:46 +0000 (16:44 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 2 Oct 2017 04:15:59 +0000 (13:15 +0900)
commit90dd04aaeb9ddbdc26c5937a118db505c6a28394
tree1e948a8692e54f52bf414d27675a8bfeb101d640
parentea220ee40cbb03a63ebad2be902057bf742492fd
repository: use FREE_AND_NULL

Use the macro FREE_AND_NULL to release allocated objects and clear their
pointers.  This is shorter and documents the intent better by combining
the two related operations into one.

Patch generated with Coccinelle and contrib/coccinelle/free.cocci.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
repository.c