commit e1d6c2b511cd22a5ef00c93a3deee9274643a1c6 from: Stefan Sperling via: Thomas Adam date: Tue Oct 22 16:27:52 2024 UTC ensure that meta->dtab gets freed whenever we clear a meta entry commit - b143701e30e72529b2b0aed4991214b3054108db commit + e1d6c2b511cd22a5ef00c93a3deee9274643a1c6 blob - 6f4aeaac0c8708dbc26bd902e02d4c3e1aea87c3 blob + 8651030eabbb32fc311740f7141bd62cba295f22 --- lib/pack_create.c +++ lib/pack_create.c @@ -104,6 +104,8 @@ clear_meta(struct got_pack_meta *meta) free(meta->base_obj_id); meta->base_obj_id = NULL; meta->reused_delta_offset = 0; + got_deltify_free(meta->dtab); + meta->dtab = NULL; } static void @@ -111,10 +113,8 @@ free_nmeta(struct got_pack_meta **meta, int nmeta) { int i; - for (i = 0; i < nmeta; i++) { + for (i = 0; i < nmeta; i++) clear_meta(meta[i]); - got_deltify_free(meta[i]->dtab); - } free(meta); }