fixed memory leak
This commit is contained in:
parent
15f204c5d6
commit
a5685b537e
|
@ -41,11 +41,12 @@ static
|
|||
int dump_ef(sc_card_t * card, const char *path, u8 * buf, size_t * buf_len)
|
||||
{
|
||||
int rv;
|
||||
sc_file_t *file = sc_file_new();
|
||||
sc_file_t *file = NULL;
|
||||
sc_path_t scpath;
|
||||
sc_format_path(path, &scpath);
|
||||
rv = sc_select_file(card, &scpath, &file);
|
||||
if (rv < 0) {
|
||||
if (file)
|
||||
sc_file_free(file);
|
||||
return rv;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue