1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-12-26 18:19:53 +03:00

Memory.c: fix pointer cast in TrackChangeObjSize() call

This commit fixes the "TrackDeleteObj: 0x12345678 is not Object!!" (where 0x12345678 is the actual address) errors with memcheck enabled.

It also fixes the following related warnings:

warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  TrackChangeObjSize((DWORD)addr, size, (DWORD)new_addr);
                     ^
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  TrackChangeObjSize((DWORD)addr, size, (DWORD)new_addr);
                                        ^
This commit is contained in:
Davide Beatrici 2018-10-14 07:47:21 +02:00
parent 9e967ce5ed
commit e496f33455

View File

@ -3915,7 +3915,7 @@ void *InternalReAlloc(void *addr, UINT size)
}
#ifndef DONT_USE_KERNEL_STATUS
TrackChangeObjSize((DWORD)addr, size, (DWORD)new_addr);
TrackChangeObjSize(POINTER_TO_UINT64(addr), size, POINTER_TO_UINT64(new_addr));
#endif // DONT_USE_KERNEL_STATUS
return new_addr;