fixed wrong condition

fixes https://github.com/OpenSC/OpenSC/issues/1465
This commit is contained in:
Frank Morgner 2018-09-04 13:51:40 +02:00
parent ddec3a437c
commit 39bd1ddd58
1 changed files with 1 additions and 1 deletions

View File

@ -628,7 +628,7 @@ int sc_file_set_sec_attr(sc_file_t *file, const u8 *sec_attr,
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)
free(file->sec_attr);
file->sec_attr = NULL;