From: "Devin Heitmueller" (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-30201-
1177105747-239.42648-75-0@perl.org>
p4raw-id: //depot/perl@31054
#ifdef _USE_LINKED_LIST
GetLock();
PMEMORY_BLOCK_HEADER ptr = (PMEMORY_BLOCK_HEADER)m_pmalloc(size+sizeof(MEMORY_BLOCK_HEADER));
+ if (!ptr) {
+ FreeLock();
+ return NULL;
+ }
LinkBlock(ptr);
FreeLock();
return (ptr+1);
PMEMORY_BLOCK_HEADER ptr = (PMEMORY_BLOCK_HEADER)(((char*)pMem)-sizeof(MEMORY_BLOCK_HEADER));
UnlinkBlock(ptr);
ptr = (PMEMORY_BLOCK_HEADER)m_prealloc(ptr, size+sizeof(MEMORY_BLOCK_HEADER));
+ if (!ptr) {
+ FreeLock();
+ return NULL;
+ }
LinkBlock(ptr);
FreeLock();