mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-26 00:26:52 +03:00
Fix memory leak in HTTP library.
git-svn-id: svn://kolibrios.org@5904 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
4f66bc4c19
commit
82ee194a2b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user