Closed a small memory leak

This commit is contained in:
2008-01-15 20:41:56 +00:00
parent a3e6d565dd
commit 8b98e34ff6
6 changed files with 27 additions and 15 deletions

View File

@ -2957,7 +2957,7 @@ int Xorriso_destroy_re(struct XorrisO *m, int flag)
}
/* @param flag bit0= shutdown libraries */
/* @param flag bit0= global shutdown of libraries */
int Xorriso_destroy(struct XorrisO **xorriso, int flag)
{
struct XorrisO *m;
@ -2965,10 +2965,8 @@ int Xorriso_destroy(struct XorrisO **xorriso, int flag)
m= *xorriso;
if(m==NULL)
return(0);
Xorriso_give_up_drive(m, 3);
Xorriso_destroy_re(m,0);
if(flag&1)
Xorriso_shutdown_libraries(m, 0);
Xorriso_detach_libraries(m, flag&1);
free((char *) m);
*xorriso= NULL;