Adds error checking
This commit is contained in:
parent
c9420046c5
commit
94772c870a
|
@ -810,6 +810,8 @@ do_select(sc_card_t * card, u8 kind,
|
||||||
if (p2 == 0x0C) {
|
if (p2 == 0x0C) {
|
||||||
if (file) {
|
if (file) {
|
||||||
*file = sc_file_new();
|
*file = sc_file_new();
|
||||||
|
if (!*file)
|
||||||
|
SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_NORMAL, SC_ERROR_OUT_OF_MEMORY);
|
||||||
(*file)->type = SC_FILE_TYPE_DF;
|
(*file)->type = SC_FILE_TYPE_DF;
|
||||||
return SC_SUCCESS;
|
return SC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue