From 82ee194a2b790439322a1b8ce52db0342f15b409 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Mon, 9 Nov 2015 21:47:39 +0000 Subject: [PATCH] Fix memory leak in HTTP library. git-svn-id: svn://kolibrios.org@5904 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/libraries/http/http.asm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/programs/develop/libraries/http/http.asm b/programs/develop/libraries/http/http.asm index 7270810c7f..1e3f3ece24 100644 --- a/programs/develop/libraries/http/http.asm +++ b/programs/develop/libraries/http/http.asm @@ -1473,6 +1473,7 @@ endl jnz .error1 ; getaddrinfo returns addrinfo struct, make the pointer to sockaddr struct + push esi ; for freeaddrinfo mov esi, [esi + addrinfo.ai_addr] mov [sockaddr], esi mov eax, [esi + sockaddr_in.sin_addr] @@ -1501,18 +1502,13 @@ endl DEBUGF 1, "Socket is now connected.\n" ; free allocated memory - push [sockaddr] call [freeaddrinfo] - mov eax, [socketnum] ret .error2: - ; free allocated memory - push [sockaddr] call [freeaddrinfo] - .error1: xor eax, eax ret