Do not access memory that has just been freed.

This commit is contained in:
Knut St. Osmundsen 2002-06-28 17:34:35 +00:00 committed by Alexandre Julliard
parent 7c4d6a98a9
commit 886bdb0dbc
1 changed files with 3 additions and 1 deletions

View File

@ -113,7 +113,7 @@ static BOOL DeleteNode(LPNOTIFICATIONLIST item)
EnterCriticalSection(&SHELL32_ChangenotifyCS);
ptr = head.next;
while((ptr != &tail) && (ret == FALSE))
while(ptr != &tail)
{
TRACE("ptr=%p\n", ptr);
@ -131,7 +131,9 @@ static BOOL DeleteNode(LPNOTIFICATIONLIST item)
for (i=0; i<item->cidl;i++) SHFree(item->apidl[i].pidlPath);
SHFree(item->apidl);
SHFree(item);
ret = TRUE;
break;
}
ptr = ptr->next;
}