Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git] / KernelLand / Kernel / heap.c
index f7054ea..ba4c9ad 100755 (executable)
@@ -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 ) {

UCC git Repository :: git.ucc.asn.au