mv: free the with_slash in check_dir_in_index()
commitd57690a9c82c8888be6bb8ae17be231a2b2802e6
authorShaoxuan Yuan <shaoxuan.yuan02@gmail.com>
Tue, 9 Aug 2022 12:09:04 +0000 (9 20:09 +0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Aug 2022 20:57:49 +0000 (10 13:57 -0700)
tree1bdf423ba71f82abd371f49f5064e6becbfb6374
parent72e59ba19e776abbff7dccbf093c73e43527a339
mv: free the with_slash in check_dir_in_index()

with_slash may be a malloc'd pointer, and when it is, free it.

Helped-by: Derrick Stolee <derrickstolee@github.com>
Helped-by: Victoria Dye <vdye@github.com>
Signed-off-by: Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/mv.c