ls-remote: release memory instead of UNLEAK
authorOlga Telezhnaya <olyatelezhnaya@gmail.com>
Thu, 18 Oct 2018 07:28:54 +0000 (07:28 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Oct 2018 02:28:12 +0000 (11:28 +0900)
Use ref_array_clear() to release memory instead of UNLEAK macros.

Signed-off-by: Olga Telezhnaia <olyatelezhnaya@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/ls-remote.c
index 1a25df7ee15b45df142679286afdb0e8c55647dc..6a0cdec30d2d77711d880f5e4b6ba6ff981e2e8d 100644 (file)
@@ -151,6 +151,6 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
        }
 
        UNLEAK(sorting);
-       UNLEAK(ref_array);
+       ref_array_clear(&ref_array);
        return status;
 }