eap: Ensure that we don't return an empty queue

This commit is contained in:
Denis Kenzior 2018-06-14 17:02:09 -05:00
parent 250568025c
commit e24d6b54d2
1 changed files with 5 additions and 0 deletions

View File

@ -492,6 +492,11 @@ int eap_check_settings(struct l_settings *settings, struct l_queue *secrets,
}
}
if (missing && l_queue_isempty(missing)) {
l_queue_destroy(missing, NULL);
missing = NULL;
}
*out_missing = missing;
return 0;