From d427a031920c413fe9e0959b228f50c4ed17c0b8 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 8 Oct 2015 19:47:01 +0200 Subject: [PATCH] Bug fix: Double free if a boot image has no extents. Coverity CID 12599. --- libisofs/fs_image.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libisofs/fs_image.c b/libisofs/fs_image.c index c080677..941c25b 100644 --- a/libisofs/fs_image.c +++ b/libisofs/fs_image.c @@ -5363,8 +5363,10 @@ int iso_eltorito_report(IsoImage *image, struct iso_impsysa_result *target, if (ret > 0 && section_count > 0) lba = sections[0].block; lba_mem[i]= lba; - if (sections != NULL) + if (sections != NULL) { free(sections); + sections = NULL; + } sprintf(msg, "El Torito boot img : %3d %4s %c %5s 0x%4.4x 0x%2.2x %5u %10u", i + 1, pltf, img->bootable ? 'y' : 'n', emul_code,