There may be a memory leak in main in /src/tools/sceac-example.c
When failed to access reader, cxt needs to be released before exiting the program. Like in the patch of CVE-2019-6502, a sc_release_context(ctx) is needed before line 71, or a memory leak may occur.
This commit is contained in:
parent
7551e14c58
commit
0dc3dcbc00
|
@ -68,6 +68,7 @@ main (int argc, char **argv)
|
|||
reader = sc_ctx_get_reader(ctx, 0);
|
||||
if (!reader) {
|
||||
fprintf(stderr, "Failed to access reader 0");
|
||||
sc_release_context(ctx);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue