Kai Blin wrote:
This fixes a Valgrind warning triggered by the NetApiBufferFree() test where a buffer is free()d twice.
@@ -52,6 +52,7 @@ NET_API_STATUS WINAPI NetApiBufferFree(LPVOID Buffer) { TRACE("(%p)\n", Buffer); HeapFree(GetProcessHeap(), 0, Buffer); + Buffer = NULL; return NERR_Success; }
I don't get it. How does setting a local variable to NULL avoid a warning about freeing it twice?
I'm not saying the patch is wrong, I'm just saying I don't get how Valgrind is tricked by this. --Juan