diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-08-30 03:53:10 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-10-03 23:17:06 +0200 |
commit | 55b74bdca7060f49f61bed85d7b53dd85957d14b (patch) | |
tree | 9986d59879eaced4f7f47eb547a7a84d9389585b | |
parent | ec6cb173cc28f500e01f5acf8c8eb3e88c7adff0 (diff) | |
download | perl-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-- | NEWS | 1 | ||||
-rw-r--r-- | URPM.xs | 12 |
2 files changed, 7 insertions, 6 deletions
@@ -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 @@ -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. */ |