entrance: don't free user if present in history

This commit is contained in:
Michael Bouchaud 2014-01-10 00:42:40 +01:00
parent b189b81401
commit 704645e370
1 changed files with 12 additions and 8 deletions

View File

@ -199,7 +199,8 @@ _entrance_history_match(const char *login)
EINA_LIST_FOREACH(_entrance_history->history, l, el) EINA_LIST_FOREACH(_entrance_history->history, l, el)
{ {
if (!strcmp(el->login, login)) // if (!strcmp(el->login, login))
if (el->login == login)
break; break;
} }
return el; return el;
@ -256,6 +257,8 @@ _entrance_user_shutdown(void)
{ {
Entrance_Login *eu; Entrance_Login *eu;
EINA_LIST_FREE(_lusers, eu) EINA_LIST_FREE(_lusers, eu)
{
if (!_entrance_history_match(eu->login))
{ {
eina_stringshare_del(eu->login); eina_stringshare_del(eu->login);
eina_stringshare_del(eu->lsess); eina_stringshare_del(eu->lsess);
@ -266,4 +269,5 @@ _entrance_user_shutdown(void)
free(eu); free(eu);
} }
} }
}