Better reporting of memory shortage with rev 3747

This commit is contained in:
Thomas Schmitt 2011-05-02 19:18:45 +00:00
parent 264859c2bd
commit dc815316c1
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;
off_t offset, bytes, total_bytes;
a= TSOB_FELD(char, 5*SfileadrL);
if(a == NULL)
{ret= -1; goto ex;}
part_path= TSOB_FELD(char, SfileadrL);
if(part_path == NULL)
{ret= -1; goto ex;}
Xorriso_alloc_meM(a, char, 5*SfileadrL);
Xorriso_alloc_meM(part_path, char, SfileadrL);
*result= 0;
respt= xorriso->result_line;
@ -663,10 +659,8 @@ ex:;
free(a2_acl);
if(d2_acl != NULL)
free(d2_acl);
if(part_path != NULL)
free(part_path);
if(a != NULL)
free(a);
Xorriso_free_meM(part_path);
Xorriso_free_meM(a);
return(ret);
}
@ -678,9 +672,7 @@ int Xorriso_pfx_disk_path(struct XorrisO *xorriso, char *iso_path,
int ret;
char *adrc= NULL;
adrc= TSOB_FELD(char, SfileadrL);
if(adrc == NULL)
{ret= -1; goto ex;}
Xorriso_alloc_meM(adrc, char, SfileadrL);
if(strncmp(iso_path, iso_prefix, strlen(iso_prefix))!=0)
{ret= -1; goto ex;}
@ -695,8 +687,7 @@ int Xorriso_pfx_disk_path(struct XorrisO *xorriso, char *iso_path,
goto ex;
ret= 1;
ex:;
if(adrc != NULL)
free(adrc);
Xorriso_free_meM(adrc);
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;
char *disk_path= NULL;
disk_path= TSOB_FELD(char, SfileadrL);
if(disk_path == NULL)
{ret= -1; goto ex;}
Xorriso_alloc_meM(disk_path, char, SfileadrL);
ret= Xorriso_pfx_disk_path(xorriso, iso_path, iso_prefix, disk_prefix,
disk_path, 0);
@ -764,8 +753,7 @@ int Xorriso_find_compare(struct XorrisO *xorriso, void *boss_iter, void *node,
if(result&(1<<17))
{ret= 3; goto ex;}
ex:;
if(disk_path != NULL)
free(disk_path);
Xorriso_free_meM(disk_path);
return(ret);
}

View File

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