fixed wrong condition
fixes https://github.com/OpenSC/OpenSC/issues/1465
This commit is contained in:
parent
ddec3a437c
commit
39bd1ddd58
|
@ -628,7 +628,7 @@ int sc_file_set_sec_attr(sc_file_t *file, const u8 *sec_attr,
|
||||||
return SC_ERROR_INVALID_ARGUMENTS;
|
return SC_ERROR_INVALID_ARGUMENTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sec_attr == NULL || sec_attr_len) {
|
if (sec_attr == NULL || sec_attr_len == 0) {
|
||||||
if (file->sec_attr != NULL)
|
if (file->sec_attr != NULL)
|
||||||
free(file->sec_attr);
|
free(file->sec_attr);
|
||||||
file->sec_attr = NULL;
|
file->sec_attr = NULL;
|
||||||
|
|
Loading…
Reference in New Issue