network/dns_resolver: fix memory leak
'reply' is allocated in Serialize() at line 120, but is not freed. Pointed out by Clang Static Analyzer. Change-Id: I9f7e0c5c2dcb976f11230ad8a5ba38d653b23d6d Reviewed-on: https://review.haiku-os.org/c/haiku/+/5530 Reviewed-by: Fredrik Holmqvist <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
8240805c04
commit
ee96bcfe51
@@ -121,7 +121,9 @@ GetAddrInfo(const char* buffer)
|
||||
freeaddrinfo(ai);
|
||||
if (result != B_OK)
|
||||
return write_port(gReplyPort, MsgError, &result, sizeof(result));
|
||||
return write_port(gReplyPort, MsgReply, reply, totalSize);
|
||||
result = write_port(gReplyPort, MsgReply, reply, totalSize);
|
||||
free(reply);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user