X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fheap.c;h=ba4c9adbdd9add234a3bd0c7649056f33f920bb6;hb=5f4d39ad0059ceec48c59d5ed87457a6bcb1c5f1;hp=f7054ea4375684ed981eb729d26ce875c183f606;hpb=eb42cce3c834d711e888d7866db98c563710993d;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/heap.c b/KernelLand/Kernel/heap.c index f7054ea4..ba4c9adb 100755 --- a/KernelLand/Kernel/heap.c +++ b/KernelLand/Kernel/heap.c @@ -353,6 +353,8 @@ void Heap_Deallocate(const char *File, int Line, void *Ptr) // INVLPTR is returned from Heap_Allocate when the allocation // size is zero. if( Ptr == INVLPTR ) return; + // free(NULL) is a no-op + if( Ptr == NULL ) return; // Alignment Check if( (tVAddr)Ptr % sizeof(void*) != 0 ) {