Hans Leidekker : netapi32/tests: Fix a memory leak.

Alexandre Julliard julliard at winehq.org
Mon Dec 7 10:26:17 CST 2009


Module: wine
Branch: master
Commit: d81f9006ded3378ea346f4f1a5d300d6db975a36
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d81f9006ded3378ea346f4f1a5d300d6db975a36

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Mon Dec  7 10:09:39 2009 +0100

netapi32/tests: Fix a memory leak.

Found by Valgrind.

---

 dlls/netapi32/tests/apibuf.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/netapi32/tests/apibuf.c b/dlls/netapi32/tests/apibuf.c
index 3400726..af4d39d 100644
--- a/dlls/netapi32/tests/apibuf.c
+++ b/dlls/netapi32/tests/apibuf.c
@@ -59,6 +59,8 @@ static void run_apibuf_tests(void)
     /* border reallocate cases */
     ok(pNetApiBufferReallocate(0, 1500, &p) == NERR_Success, "Reallocate with OldBuffer = NULL failed\n");
     ok(p != NULL, "No memory got allocated\n");
+    ok(pNetApiBufferFree(p) == NERR_Success, "NetApiBufferFree failed\n");
+
     ok(pNetApiBufferAllocate(1024, &p) == NERR_Success, "Memory not reserved\n");
     ok(pNetApiBufferReallocate(p, 0, &p) == NERR_Success, "Not freed\n");
     ok(p == NULL, "Pointer not cleared\n");




More information about the wine-cvs mailing list