Better reporting of memory shortage with rev 3747

This commit is contained in:
Thomas Schmitt 2011-05-02 19:18:45 +00:00
parent 59c60d410e
commit 3d57d19a90
2 changed files with 9 additions and 21 deletions

View File

@ -312,12 +312,8 @@ int Xorriso_compare_2_files(struct XorrisO *xorriso, char *disk_adr,
int partno, total_parts= 0; int partno, total_parts= 0;
off_t offset, bytes, total_bytes; off_t offset, bytes, total_bytes;
a= TSOB_FELD(char, 5*SfileadrL); Xorriso_alloc_meM(a, char, 5*SfileadrL);
if(a == NULL) Xorriso_alloc_meM(part_path, char, SfileadrL);
{ret= -1; goto ex;}
part_path= TSOB_FELD(char, SfileadrL);
if(part_path == NULL)
{ret= -1; goto ex;}
*result= 0; *result= 0;
respt= xorriso->result_line; respt= xorriso->result_line;
@ -663,10 +659,8 @@ ex:;
free(a2_acl); free(a2_acl);
if(d2_acl != NULL) if(d2_acl != NULL)
free(d2_acl); free(d2_acl);
if(part_path != NULL) Xorriso_free_meM(part_path);
free(part_path); Xorriso_free_meM(a);
if(a != NULL)
free(a);
return(ret); return(ret);
} }
@ -678,9 +672,7 @@ int Xorriso_pfx_disk_path(struct XorrisO *xorriso, char *iso_path,
int ret; int ret;
char *adrc= NULL; char *adrc= NULL;
adrc= TSOB_FELD(char, SfileadrL); Xorriso_alloc_meM(adrc, char, SfileadrL);
if(adrc == NULL)
{ret= -1; goto ex;}
if(strncmp(iso_path, iso_prefix, strlen(iso_prefix))!=0) if(strncmp(iso_path, iso_prefix, strlen(iso_prefix))!=0)
{ret= -1; goto ex;} {ret= -1; goto ex;}
@ -695,8 +687,7 @@ int Xorriso_pfx_disk_path(struct XorrisO *xorriso, char *iso_path,
goto ex; goto ex;
ret= 1; ret= 1;
ex:; ex:;
if(adrc != NULL) Xorriso_free_meM(adrc);
free(adrc);
return(ret); return(ret);
} }
@ -716,9 +707,7 @@ int Xorriso_find_compare(struct XorrisO *xorriso, void *boss_iter, void *node,
int ret, result, uret, follow_links, deleted= 0; int ret, result, uret, follow_links, deleted= 0;
char *disk_path= NULL; char *disk_path= NULL;
disk_path= TSOB_FELD(char, SfileadrL); Xorriso_alloc_meM(disk_path, char, SfileadrL);
if(disk_path == NULL)
{ret= -1; goto ex;}
ret= Xorriso_pfx_disk_path(xorriso, iso_path, iso_prefix, disk_prefix, ret= Xorriso_pfx_disk_path(xorriso, iso_path, iso_prefix, disk_prefix,
disk_path, 0); disk_path, 0);
@ -764,8 +753,7 @@ int Xorriso_find_compare(struct XorrisO *xorriso, void *boss_iter, void *node,
if(result&(1<<17)) if(result&(1<<17))
{ret= 3; goto ex;} {ret= 3; goto ex;}
ex:; ex:;
if(disk_path != NULL) Xorriso_free_meM(disk_path);
free(disk_path);
return(ret); return(ret);
} }

View File

@ -1 +1 @@
#define Xorriso_timestamP "2011.05.02.191704" #define Xorriso_timestamP "2011.05.02.191905"