Closed a memory leak with unreleased IsoImage in boot image inquiry

This commit is contained in:
Thomas Schmitt 2009-02-10 12:58:36 +00:00
parent d2cc6531c0
commit e4b8310812
2 changed files with 4 additions and 1 deletions

View File

@ -1 +1 @@
#define Xorriso_timestamP "2009.02.09.185940"
#define Xorriso_timestamP "2009.02.10.125831"

View File

@ -4031,9 +4031,12 @@ no_boot:;
}
return(ret);
}
/* Important: no return before iso_image_unref(image); */
/* Using the nodes with extreme care . They might be deleted meanwhile. */
ret= iso_image_get_boot_image(image, &bootimg, &bootimg_node, &bootcat_node);
iso_image_unref(image);
image= NULL;
if(ret != 1)
goto no_boot;
ret= Xorriso_path_from_node(xorriso, NULL, xorriso->loaded_boot_bin_lba,