aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs6
1 files changed, 4 insertions, 2 deletions
diff --git a/URPM.xs b/URPM.xs
index 07e1f2a..2b580cd 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -3350,7 +3350,7 @@ Urpm_verify_rpm(filename, ...)
int i;
char * fmtsig = NULL;
char buffer[8192];
- rpmts ts;
+ rpmts ts = NULL;
CODE:
for (i = 1; i < items-1; i+=2) {
STRLEN len;
@@ -3441,7 +3441,7 @@ Urpm_verify_rpm(filename, ...)
}
}
- if (!db)
+ if (!db && ts)
ts = rpmtsFree(ts);
else
/* Restoring verification flag to the ts */
@@ -3508,6 +3508,8 @@ Urpm_import_pubkey(...)
blen = block_len;
b = memcpy(malloc(blen+1), block, blen+1); /* XXX should use xmalloc instead */
rc = 0;
+ } else {
+ rc = 0;
}
if (rc || b == NULL || blen <= 0) {
/* error reading file, or no file or block */