X-Git-Url: https://git.ucc.asn.au/?p=tpg%2Facess2.git;a=blobdiff_plain;f=KernelLand%2FKernel%2Fheap.c;fp=KernelLand%2FKernel%2Fheap.c;h=ba4c9adbdd9add234a3bd0c7649056f33f920bb6;hp=f7054ea4375684ed981eb729d26ce875c183f606;hb=845b6f9d90bb87b5e760e4d49aa93b0e003ab750;hpb=67a7fe2bb79eceaf10c572a99bd8345c4e81cf5b 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 ) {