#12152: Memory is not released after a failed call to realloc()
----------------------------------------+----------------------------
Reporter: philcostin | Owner: axeld
Type: bug | Status: reopened
Priority: normal | Milestone: Unscheduled
Component: Network & Internet/Stack | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 1 | Platform: All
----------------------------------------+----------------------------
Comment (by Janus):
For the Haiku guidelines:
{{{
sockaddr *resized -> sockaddr* resized
}}}
You can remove the else
{{{
if (resized == NULL) {
free(address);
return NULL;
}
address = resized;
}}}
The patch with this changes looks good to me. Has somebody more to say?
--
Ticket URL: <https://dev.haiku-os.org/ticket/12152#comment:7>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.