Closed memory leak, adapted to new members in isoburn_source_opts

This commit is contained in:
Thomas Schmitt 2008-01-14 16:39:07 +00:00
parent 701173a01b
commit 6bc6323c78
2 changed files with 12 additions and 16 deletions

View File

@ -257,8 +257,10 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
if(flag&1) { if(flag&1) {
volset= isoburn_get_attached_image(drive); volset= isoburn_get_attached_image(drive);
if(volset != NULL) /* The image object is already created */ if(volset != NULL) { /* The image object is already created */
Xorriso_set_image_severities(xorriso, volset, 0); Xorriso_set_image_severities(xorriso, volset, 0);
iso_image_unref(volset);
}
} }
if(flag&2) { if(flag&2) {
@ -459,6 +461,10 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
sopts.joliet= !!xorriso->do_joliet; sopts.joliet= !!xorriso->do_joliet;
sopts.omit_version_numbers= 0; sopts.omit_version_numbers= 0;
sopts.allow_deep_paths= 1; sopts.allow_deep_paths= 1;
sopts.max_37_char_filenames= 0;
sopts.wopts.no_force_dots= 0;
sopts.allow_lowercase= 0;
sopts.allow_full_ascii= 0;
sopts.joliet_longer_paths= 0; sopts.joliet_longer_paths= 0;
sopts.copy_eltorito= 1; sopts.copy_eltorito= 1;
sopts.sort_files= 1; sopts.sort_files= 1;
@ -3009,15 +3015,14 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
struct stat stbuf; struct stat stbuf;
char *name; char *name;
#ifdef Xorriso_fat_local_meM #ifdef Xorriso_fat_local_meM
char path[SfileadrL], sfe[5*SfileadrL]; char path[SfileadrL], abs_path[SfileadrL];
#else /* Xorriso_fat_local_meM */ #else /* Xorriso_fat_local_meM */
char *path= NULL, *sfe= NULL, *abs_path= NULL; char *path= NULL, *abs_path= NULL;
sfe= malloc(5*SfileadrL);
path= malloc(SfileadrL); path= malloc(SfileadrL);
abs_path= malloc(SfileadrL); abs_path= malloc(SfileadrL);
if(sfe==NULL || path==NULL || abs_path==NULL) { if(path==NULL || abs_path==NULL) {
Xorriso_no_malloc_memory(xorriso, &sfe, 0); Xorriso_no_malloc_memory(xorriso, &path, 0);
{ret= -1; goto ex;} {ret= -1; goto ex;}
} }
#endif /* ! Xorriso_fat_local_meM */ #endif /* ! Xorriso_fat_local_meM */
@ -3082,11 +3087,6 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
if(ret<0) if(ret<0)
goto ex; goto ex;
if(ret>0) { if(ret>0) {
#ifdef NIX
sprintf(xorriso->result_line, "%s\n", Text_shellsafe(path, sfe, 0));
Xorriso_result(xorriso, 0);
#else
ret= Xorriso_make_abs_adr(xorriso, xorriso->wdi, path, abs_path, 1|4); ret= Xorriso_make_abs_adr(xorriso, xorriso->wdi, path, abs_path, 1|4);
if(ret<=0) if(ret<=0)
goto ex; goto ex;
@ -3095,8 +3095,6 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
if(Xorriso_eval_problem_status(xorriso, ret, 1|2)<0) if(Xorriso_eval_problem_status(xorriso, ret, 1|2)<0)
goto ex; goto ex;
} }
#endif /* ! NIX */
} }
if(S_ISDIR(stbuf.st_mode)) { if(S_ISDIR(stbuf.st_mode)) {
@ -3111,8 +3109,6 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
ex:; ex:;
#ifndef Xorriso_fat_local_meM #ifndef Xorriso_fat_local_meM
if(sfe!=NULL)
free(sfe);
if(path!=NULL) if(path!=NULL)
free(path); free(path);
if(abs_path!=NULL) if(abs_path!=NULL)

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.01.11.212545" #define Xorriso_timestamP "2008.01.14.163814"