On Tue, Jul 22, 2014 at 3:19 PM, Fedor Indutny <[email protected]> wrote:
> I do believe that the most of such code paths are handled. You could ask Ben
> if you don't believe me.
Fedor, I have huge confidence in you! No kidding, libuv is solid code,
and it tries to force it's user to do most of the allocation, as it
should!
But libuv#1374 adds a number of such paths, and errors bubble up... In
my little example, you will note that code coverage would not find the
memory leak.
Anyhow, I don't have much stake in this... V8 aborts hard when out of
memory, take this all as a friendly "there lie dragons"!
And I just grepped for malloc, about 5 uses in, I find src/unix/aix.c line 308:
```
ifc.ifc_req = (struct ifreq*)malloc(size);
ifc.ifc_len = size;
if (ioctl(sockfd, SIOCGIFCONF, &ifc) == -1) {
uv__close(sockfd);
return -ENOSYS;
}
```
I suspect that ioctl() rarely if ever fails, but if it does, this will leak.
--
You received this message because you are subscribed to the Google Groups
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.