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));
|
dup2(tmp, fileno(stdout));
|
||||||
clearerr(stdout);
|
clearerr(stdout);
|
||||||
if (sizeof(buffer) != r) {
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
close(tmp);
|
close(tmp);
|
||||||
|
if (sizeof(buffer) != r)
|
||||||
|
return EXIT_FAILURE;
|
||||||
} else {
|
} else {
|
||||||
util_hex_dump_asc(stdout, buffer, sizeof(buffer), -1);
|
util_hex_dump_asc(stdout, buffer, sizeof(buffer), -1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue