netapi32/tests: Fix a memory leak

Jeff Latimer <[email protected]> Mon, 4 Jun 2018 13:13:54 +1000
Newsgroups gmane.comp.emulators.wine.patches
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------8CAB17A1B7AC4DC41E3A0320
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

---
 dlls/netapi32/tests/access.c | 2 ++
 1 file changed, 2 insertions(+)



--------------8CAB17A1B7AC4DC41E3A0320
Content-Type: text/x-patch;
 name="0009-netapi32-tests-Fix-a-memory-leak.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0009-netapi32-tests-Fix-a-memory-leak.patch"

diff --git a/dlls/netapi32/tests/access.c b/dlls/netapi32/tests/access.c
index 34247a09d2..416a685f4a 100644
--- a/dlls/netapi32/tests/access.c
+++ b/dlls/netapi32/tests/access.c
@@ -132,6 +132,8 @@ static void run_usergetinfo_tests(void)
                   (lstrlenW(ui0->usri0_name) + 1) * sizeof(WCHAR)),
        "Is allocated with NetApiBufferAllocate\n");
 
+    pNetApiBufferFree(ui0);
+
     /* Level 1 */
     rc=pNetUserGetInfo(NULL, sTestUserName, 1, (LPBYTE *)&ui1);
     ok(rc == NERR_Success, "NetUserGetInfo level 1 failed: 0x%08x.\n", rc);


--------------8CAB17A1B7AC4DC41E3A0320
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

Cg==

--------------8CAB17A1B7AC4DC41E3A0320--