pki: Avoid possible memory leak

Actually the condition was duplicated at the beginning of the function and this
one could not be hit (again), but it is an error to be fixed anyway.

Thanks Coverity!

CID 1618865

CID 1618864

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2025-07-29 15:39:33 +02:00
parent 8069679033
commit 8c89633a45

View File

@@ -3221,12 +3221,6 @@ int sshsig_verify(const void *data,
SSH_LOG(SSH_LOG_TRACE, "Signature verification failed");
goto cleanup;
}
if (strlen(sig_namespace) == 0) {
SSH_LOG(SSH_LOG_TRACE,
"Invalid parameters provided to sshsig_verify: empty namespace "
"string");
return SSH_ERROR;
}
if (sign_key != NULL) {
*sign_key = key;