object.c: clear replace map before freeing it

Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefan Beller committed May 17, 2018 at 11:29 UTC 7a1dc605af0d76b6de5832f1a2c1587e693de6df
1 file changed +2
object.c
+2
@@ -480,6 +480,8 @@ void raw_object_store_clear(struct raw_object_store *o)
480 {
481 FREE_AND_NULL(o->objectdir);
482 FREE_AND_NULL(o->alternate_db);
483 +
484 + oidmap_free(o->replace_map, 1);
485 FREE_AND_NULL(o->replace_map);
486
487 free_alt_odbs(o);