openpgp-tool: fixed resource leak
VTA: slightly touched, original commit f0ddbf4
This commit is contained in:
parent
b0a708b0bb
commit
c65caed7f4
|
@ -378,10 +378,9 @@ static int do_dump_do(sc_card_t *card, unsigned int tag)
|
|||
}
|
||||
dup2(tmp, fileno(stdout));
|
||||
clearerr(stdout);
|
||||
if (sizeof(buffer) != r) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
close(tmp);
|
||||
if (sizeof(buffer) != r)
|
||||
return EXIT_FAILURE;
|
||||
} else {
|
||||
util_hex_dump_asc(stdout, buffer, sizeof(buffer), -1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue