CID 321790 (#1 of 1): Resource leak (RESOURCE_LEAK)

This commit is contained in:
Frank Morgner 2018-11-06 15:45:51 +01:00
parent 1e7bb83659
commit 3c0a16dc39
1 changed files with 3 additions and 0 deletions

View File

@ -1712,6 +1712,9 @@ static int do_random(int argc, char **argv)
sc_unlock(card);
if (r < 0) {
fprintf(stderr, "Failed to get random bytes: %s\n", sc_strerror(r));
if (argc == 2) {
fclose(outf);
}
return -1;
}