Reacted on static code checker warning reported by George Danchev

This commit is contained in:
Thomas Schmitt 2011-05-22 18:14:56 +00:00
parent cd606177c6
commit f6a3170907
4 changed files with 14 additions and 11 deletions

View File

@ -791,8 +791,10 @@ int Findjob_set_name_expr(struct FindjoB *o, char *name_expr, int flag)
{ret= -1; goto ex;};
}
Xorriso__bourne_to_reg(name_expr, regexpr, 0);
if(regcomp(name_re, regexpr, 0) != 0)
if(regcomp(name_re, regexpr, 0) != 0) {
free((char *) name_re);
{ret= 0; goto ex;};
}
t->arg2= name_re;
ret= 1;
ex:;

View File

@ -102,15 +102,15 @@ int Xorriso_option_add(struct XorrisO *xorriso, int argc, char **argv,
char *target= NULL, *source= NULL, *ept, *eff_path= NULL;
char **optv= NULL, *rpt, *wpt;
Xorriso_alloc_meM(target, char, SfileadrL);
Xorriso_alloc_meM(source, char, SfileadrL);
Xorriso_alloc_meM(eff_path, char, SfileadrL);
ret= Xorriso_opt_args(xorriso, "-add", argc, argv, *idx, &end_idx,
&optc, &optv, ((!!xorriso->allow_graft_points)<<2)|2);
if(ret<=0)
goto ex;
Xorriso_alloc_meM(target, char, SfileadrL);
Xorriso_alloc_meM(source, char, SfileadrL);
Xorriso_alloc_meM(eff_path, char, SfileadrL);
if(!(flag&2))
Xorriso_pacifier_reset(xorriso, 0);
for(i= 0; i<optc; i++) {

View File

@ -469,11 +469,6 @@ int Xorriso_option_map_l(struct XorrisO *xorriso, int argc, char **argv,
t_wd= xorriso->wdi;
Xorriso_pacifier_reset(xorriso, 0);
mode= (flag>>8) & 15;
Xorriso_alloc_meM(source_prefix, char, SfileadrL);
Xorriso_alloc_meM(target_prefix, char, SfileadrL);
Xorriso_alloc_meM(eff_source, char, SfileadrL);
Xorriso_alloc_meM(eff_target, char, SfileadrL);
if(mode==1)
cmd= "-compare_l";
@ -495,6 +490,12 @@ int Xorriso_option_map_l(struct XorrisO *xorriso, int argc, char **argv,
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 1);
ret= 0; goto ex;
}
Xorriso_alloc_meM(source_prefix, char, SfileadrL);
Xorriso_alloc_meM(target_prefix, char, SfileadrL);
Xorriso_alloc_meM(eff_source, char, SfileadrL);
Xorriso_alloc_meM(eff_target, char, SfileadrL);
ret= Xorriso_normalize_img_path(xorriso, s_wd, argv[*idx],
source_prefix, ns_flag | 64);
if(ret<=0)

View File

@ -1 +1 @@
#define Xorriso_timestamP "2011.05.22.143652"
#define Xorriso_timestamP "2011.05.22.181525"