Merge pull request #394 from DrChat/interlocked_pop_fix

Fix InterlockedPopEntrySList dereferencing a NULL pointer
This commit is contained in:
Ben Vanik 2015-08-16 14:56:13 -07:00
commit 3b8ee6eb97
1 changed files with 1 additions and 1 deletions

View File

@ -1323,7 +1323,7 @@ pointer_result_t InterlockedPopEntrySList(pointer_t<X_SLIST_HEADER> plist_ptr) {
old_hdr = *plist_ptr;
auto next = kernel_memory()->TranslateVirtual<X_SINGLE_LIST_ENTRY*>(
old_hdr.next.next);
if (!next) {
if (!old_hdr.next.next) {
return 0;
}
popped = old_hdr.next.next;