X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=KernelLand%2FKernel%2Fheap.c;h=ba4c9adbdd9add234a3bd0c7649056f33f920bb6;hb=5cab4c07bc13888dc7956194ef9595508072a4eb;hp=f7054ea4375684ed981eb729d26ce875c183f606;hpb=239a0ceb0c93dc560339484a020747c1bf8761d9;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 ) {