Stuffed memory leaks on -commit and loading of El Torito records
This commit is contained in:
@ -457,6 +457,7 @@ int Xorriso_record_boot_info(struct XorrisO *xorriso, int flag)
|
||||
return(0);
|
||||
ret= iso_image_get_boot_image(image, &bootimg,
|
||||
&bootimg_node, &bootcat_node);
|
||||
iso_image_unref(image); /* release obtained reference */
|
||||
if(ret != 1)
|
||||
return(0);
|
||||
if(bootimg_node != NULL)
|
||||
@ -830,9 +831,9 @@ int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag)
|
||||
"on attempt to give up drive", 0);
|
||||
|
||||
if(!in_is_out_too) {
|
||||
if(drive!=NULL && !in_is_out_too)
|
||||
if(drive!=NULL)
|
||||
isoburn_drive_release(drive,!!(flag&4));
|
||||
if(dinfo!=NULL && !in_is_out_too)
|
||||
if(dinfo!=NULL)
|
||||
burn_drive_info_free(dinfo);
|
||||
}
|
||||
xorriso->in_drive_handle= NULL;
|
||||
@ -1472,6 +1473,8 @@ ex:;
|
||||
}
|
||||
if(disc!=NULL)
|
||||
burn_disc_free(disc);
|
||||
if(image != NULL)
|
||||
iso_image_unref(image);
|
||||
isoburn_igopt_destroy(&sopts, 0);
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
return(ret);
|
||||
@ -4121,7 +4124,7 @@ no_boot:;
|
||||
|
||||
/* 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);
|
||||
iso_image_unref(image); /* release obtained reference */
|
||||
image= NULL;
|
||||
if(ret != 1)
|
||||
goto no_boot;
|
||||
@ -5111,7 +5114,7 @@ int Xorriso_rmi(struct XorrisO *xorriso, void *boss_iter, off_t boss_mem,
|
||||
char *sfe= NULL, *sub_path= NULL;
|
||||
off_t mem;
|
||||
IsoNode **node_array= NULL;
|
||||
int node_count, node_idx;
|
||||
int node_count= 0, node_idx;
|
||||
|
||||
/* Avoiding large local memory objects in order to save stack space */
|
||||
sfe= malloc(5*SfileadrL);
|
||||
|
Reference in New Issue
Block a user