Closed a small memory leak

master
Thomas Schmitt 15 years ago
parent a3e6d565dd
commit 8b98e34ff6
  1. 16
      test/ng_xorrisoburn.c
  2. 3
      test/ng_xorrisoburn.h
  3. 6
      test/xorriso.c
  4. 2
      test/xorriso_timestamp.h
  5. 12
      test/xorrisoburn.c
  6. 3
      test/xorrisoburn.h

@ -119,11 +119,19 @@ int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag)
}
int Xorriso_shutdown_libraries(struct XorrisO *xorriso, int flag)
/* @param flag bit0= global shutdown of libraries */
int Xorriso_detach_libraries(struct XorrisO *xorriso, int flag)
{
if(xorriso->libs_are_started==0)
return(0);
isoburn_finish();
Xorriso_give_up_drive(xorriso, 3);
if(xorriso->in_volset_handle!=NULL) { /* standalone image */
iso_image_unref((IsoImage *) xorriso->in_volset_handle);
xorriso->in_volset_handle= NULL;
}
if(flag&1) {
if(xorriso->libs_are_started==0)
return(0);
isoburn_finish();
}
return(1);
}

@ -19,7 +19,8 @@ struct FindjoB;
int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag);
int Xorriso_shutdown_libraries(struct XorrisO *xorriso, int flag);
/* @param flag bit0= global shutdown of libraries */
int Xorriso_detach_libraries(struct XorrisO *xorriso, int flag);
int Xorriso_create_empty_iso(struct XorrisO *xorriso, int flag);

@ -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;

@ -1 +1 @@
#define Xorriso_timestamP "2008.01.15.174409"
#define Xorriso_timestamP "2008.01.15.204057"

@ -101,11 +101,15 @@ int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag)
}
int Xorriso_shutdown_libraries(struct XorrisO *xorriso, int flag)
/* @param flag bit0= global shutdown of libraries */
int Xorriso_detach_libraries(struct XorrisO *xorriso, int flag)
{
if(xorriso->libs_are_started==0)
return(0);
isoburn_finish();
Xorriso_give_up_drive(xorriso, 3);
if(flag&1) {
if(xorriso->libs_are_started==0)
return(0);
isoburn_finish();
}
return(1);
}

@ -19,7 +19,8 @@ struct FindjoB;
int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag);
int Xorriso_shutdown_libraries(struct XorrisO *xorriso, int flag);
/* @param flag bit0= global shutdown of libraries */
int Xorriso_detach_libraries(struct XorrisO *xorriso, int flag);
int Xorriso_create_empty_iso(struct XorrisO *xorriso, int flag);

Loading…
Cancel
Save