From 6bc6323c783a9a909a85f0991cf8f8d74b1e3525 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 14 Jan 2008 16:39:07 +0000 Subject: [PATCH] Closed memory leak, adapted to new members in isoburn_source_opts --- test/ng_xorrisoburn.c | 26 +++++++++++--------------- test/xorriso_timestamp.h | 2 +- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/test/ng_xorrisoburn.c b/test/ng_xorrisoburn.c index c2d458ca..e3ee86b3 100644 --- a/test/ng_xorrisoburn.c +++ b/test/ng_xorrisoburn.c @@ -257,8 +257,10 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag) Xorriso_process_msg_queues(xorriso,0); if(flag&1) { 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); + iso_image_unref(volset); + } } if(flag&2) { @@ -459,6 +461,10 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag) sopts.joliet= !!xorriso->do_joliet; sopts.omit_version_numbers= 0; 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.copy_eltorito= 1; sopts.sort_files= 1; @@ -3009,15 +3015,14 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job, struct stat stbuf; char *name; #ifdef Xorriso_fat_local_meM - char path[SfileadrL], sfe[5*SfileadrL]; + char path[SfileadrL], abs_path[SfileadrL]; #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); abs_path= malloc(SfileadrL); - if(sfe==NULL || path==NULL || abs_path==NULL) { - Xorriso_no_malloc_memory(xorriso, &sfe, 0); + if(path==NULL || abs_path==NULL) { + Xorriso_no_malloc_memory(xorriso, &path, 0); {ret= -1; goto ex;} } #endif /* ! Xorriso_fat_local_meM */ @@ -3082,11 +3087,6 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job, if(ret<0) goto ex; 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); if(ret<=0) 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) goto ex; } -#endif /* ! NIX */ - } if(S_ISDIR(stbuf.st_mode)) { @@ -3111,8 +3109,6 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job, ex:; #ifndef Xorriso_fat_local_meM - if(sfe!=NULL) - free(sfe); if(path!=NULL) free(path); if(abs_path!=NULL) diff --git a/test/xorriso_timestamp.h b/test/xorriso_timestamp.h index 0d0ad751..680099bf 100644 --- a/test/xorriso_timestamp.h +++ b/test/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.01.11.212545" +#define Xorriso_timestamP "2008.01.14.163814"