summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rpmchecksig.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c
index f175791dc..28d8836e0 100644
--- a/lib/rpmchecksig.c
+++ b/lib/rpmchecksig.c
@@ -562,15 +562,15 @@ static void formatResult(rpmSigTag sigtag, rpmRC sigres, const char *result,
const char *signame = sigtagname(sigtag, (sigres != RPMRC_OK));
if (havekey && (sigres == RPMRC_NOKEY || sigres == RPMRC_NOTTRUSTED)) {
- char *keyid = NULL;
- char *idprob = NULL;
const char *tempKey = strstr(result, "ey ID");
- if (tempKey)
- keyid = strndup(tempKey + 6, 8);
- rasprintf(&idprob, " %s#%s", signame, keyid);
- rstrcat(keyprob, idprob);
- free(keyid);
- free(idprob);
+ if (tempKey) {
+ char *keyid = strndup(tempKey + 6, 8);
+ char *idprob = NULL;
+ rasprintf(&idprob, " %s#%s", signame, keyid);
+ rstrcat(keyprob, idprob);
+ free(keyid);
+ free(idprob);
+ }
}
rasprintf(&msg, (*keyprob ? "(%s) " : "%s "), signame);
}