mcrd: Do not leak memory
Similar as in 62049ea18c
Thanks oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28405
This commit is contained in:
parent
5df913b7f5
commit
1ae8b60425
|
@ -882,6 +882,11 @@ select_file_by_fid(sc_card_t * card, unsigned short *pathptr,
|
|||
priv->curpathlen--;
|
||||
priv->is_ef = 0;
|
||||
}
|
||||
/* Free the previously allocated file so we do not leak memory here */
|
||||
if (file) {
|
||||
sc_file_free(*file);
|
||||
*file = NULL;
|
||||
}
|
||||
r = select_down(card, pathptr, 1, 0, file);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue