Closed memory leaks detected by valgrind

This commit is contained in:
Thomas Schmitt 2011-02-14 13:15:04 +00:00
parent 5d3fbb7060
commit 00a1607c8c
5 changed files with 11 additions and 3 deletions

View File

@ -447,6 +447,10 @@ int Xorriso_destroy(struct XorrisO **xorriso, int flag)
m= *xorriso;
if(m==NULL)
return(0);
/* Give up drives and image to unref all connected xorriso objects */
Xorriso_give_up_drive(m, 3);
if(m->in_charset!=NULL)
free(m->in_charset);
if(m->out_charset!=NULL)

View File

@ -118,6 +118,8 @@ int Xorriso_extf_destroy(struct XorrisO *xorriso, struct Xorriso_extF **filter,
if(cmd != NULL) {
if(cmd->refcount > 0)
return(0);
if(cmd->path != NULL)
free(cmd->path);
if(cmd->suffix != NULL)
free(cmd->suffix);
if(cmd->argv != NULL) {
@ -128,6 +130,7 @@ int Xorriso_extf_destroy(struct XorrisO *xorriso, struct Xorriso_extF **filter,
}
if(cmd->name != NULL)
free(cmd->name);
free((char *) cmd);
}
free((char *) *filter);
*filter= NULL;

View File

@ -181,9 +181,9 @@ no_memory:;
ret= 1;
ex:;
if(patterns!=NULL)
free((char *) patterns);
if(ret<=0) {
if(patterns!=NULL)
free((char *) patterns);
Sfile_destroy_argv(&filec, &filev, 0);
} else {
*optc= filec;

View File

@ -1215,6 +1215,7 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
break;
}
}
iso_image_unref(image);
return(1);
}

View File

@ -1 +1 @@
#define Xorriso_timestamP "2011.02.12.172930"
#define Xorriso_timestamP "2011.02.14.090737"