pkcs15-tool: coverity scan warning RESOURCE-LEAK
Coverity scan CID 402622: Resource leak (RESOURCE_LEAK)
This commit is contained in:
parent
62eb0d05d7
commit
c6f4e09477
|
@ -811,10 +811,14 @@ static int read_ssh_key(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r == SC_ERROR_OBJECT_NOT_FOUND) {
|
if (r == SC_ERROR_OBJECT_NOT_FOUND) {
|
||||||
|
if (outf != stdout)
|
||||||
|
fclose(outf);
|
||||||
fprintf(stderr, "Public key with ID '%s' not found.\n", opt_pubkey);
|
fprintf(stderr, "Public key with ID '%s' not found.\n", opt_pubkey);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
|
if (outf != stdout)
|
||||||
|
fclose(outf);
|
||||||
fprintf(stderr, "Public key enumeration failed: %s\n", sc_strerror(r));
|
fprintf(stderr, "Public key enumeration failed: %s\n", sc_strerror(r));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue