aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-08-30 03:53:10 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-10-03 23:17:06 +0200
commit55b74bdca7060f49f61bed85d7b53dd85957d14b (patch)
tree9986d59879eaced4f7f47eb547a7a84d9389585b
parentec6cb173cc28f500e01f5acf8c8eb3e88c7adff0 (diff)
downloadperl-URPM-55b74bdca7060f49f61bed85d7b53dd85957d14b.tar
perl-URPM-55b74bdca7060f49f61bed85d7b53dd85957d14b.tar.gz
perl-URPM-55b74bdca7060f49f61bed85d7b53dd85957d14b.tar.bz2
perl-URPM-55b74bdca7060f49f61bed85d7b53dd85957d14b.tar.xz
perl-URPM-55b74bdca7060f49f61bed85d7b53dd85957d14b.zip
coverity: fix "Unused pointer value"
'Pointer "foo" returned by "_free(foo)" is never used' (improve coverity scan's SNR)
-rw-r--r--NEWS1
-rw-r--r--URPM.xs12
2 files changed, 7 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 8dc72cf..d056bff 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
- adapt to perl-5.18 random hash keys ordering
now find_required_package() always sort matching packages by their names
before sorting them by arch and score
+- coverity fixes
Version 4.27 - 22 March 2013
diff --git a/URPM.xs b/URPM.xs
index b3b83e0..4b59da5 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -2344,7 +2344,7 @@ Db_verify(prefix=NULL)
ts = rpmtsCreate();
rpmtsSetRootDir(ts, prefix);
RETVAL = rpmtsVerifyDB(ts) == 0;
- ts = rpmtsFree(ts);
+ rpmtsFree(ts);
OUTPUT:
RETVAL
@@ -2594,7 +2594,7 @@ Trans_check(trans, ...)
} else if (gimme == G_SCALAR)
mXPUSHs(newSViv(1));
- ps = rpmpsFree(ps);
+ rpmpsFree(ps);
}
void
@@ -2717,7 +2717,7 @@ Trans_run(trans, data, ...)
PUTBACK;
return_problems(ps, translate_message, raw_message || !translate_message);
SPAGAIN;
- ps = rpmpsFree(ps);
+ rpmpsFree(ps);
}
rpmtsEmpty(trans->ts);
(void)rpmtsFree(trans->ts);
@@ -3138,7 +3138,7 @@ Urpm_verify_signature(filename, prefix=NULL)
break;
}
RETVAL = result;
- if (h) h = headerFree(h);
+ if (h) headerFree(h);
(void)rpmtsFree(ts);
}
@@ -3166,7 +3166,7 @@ Urpm_import_pubkey_file(db, filename)
RETVAL = 0;
else
RETVAL = 1;
- pkt = _free(pkt);
+ _free(pkt);
(void)rpmtsFree(ts);
OUTPUT:
RETVAL
@@ -3217,7 +3217,7 @@ Urpm_spec2srcheader(specfile)
pkg = (URPM__Package)calloc(1, sizeof(struct s_Package));
pkg->h = headerLink(header);
XPUSHs(sv_setref_pv(sv_newmortal(), "URPM::Package", (void*)pkg));
- spec = rpmSpecFree(spec);
+ rpmSpecFree(spec);
} else {
XPUSHs(&PL_sv_undef);
/* apparently rpmlib sets errno to this when given a bad spec. */