Fixed a SIGSEGV with empty drive
This commit is contained in:
@ -184,9 +184,9 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
||||
xorriso->in_volset_handle= volset;
|
||||
ret= 1;
|
||||
ex:
|
||||
if(ret<=0) {
|
||||
if(ret<0) {
|
||||
|
||||
/* >>> ??? give up not-so-suitable drive ? */;
|
||||
/* >>> give up drive */;
|
||||
|
||||
}
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
@ -210,7 +210,8 @@ int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag)
|
||||
"on attempt to give drive up", 0);
|
||||
isoburn_drive_release(drive,0);
|
||||
|
||||
iso_volset_free((struct iso_volset *) xorriso->in_volset_handle);
|
||||
if(xorriso->in_volset_handle!=NULL)
|
||||
iso_volset_free((struct iso_volset *) xorriso->in_volset_handle);
|
||||
xorriso->in_volset_handle= NULL;
|
||||
xorriso->volset_change_pending= 0;
|
||||
|
||||
|
Reference in New Issue
Block a user