On Fri, May 30, 2008 at 11:02:22AM -0400, Daniel Veillard wrote:
On Fri, May 30, 2008 at 03:37:06PM +0100, Daniel P. Berrange wrote:
> THis patch switches over the remote daemon to use the memory allocation
> APIs. This required exporting the 4 apis in the .so. I discovered along
> the way that none of the remote RPC dispatcher impls checked for malloc
> failure, so I've had to add that in too.
Looks fine, this really cleans things up, especially reallocs
> if (getsockname(sock->fd, (struct sockaddr *)(&sa), &salen) <
0)
> - return -1;
> + goto cleanup;
>
Hum, changes the semantic but it looks like it will avoid leaking
file descriptors too..
Yes, that is correct - we were leaking FDs. It was a minor issue though
because the daemon will shortly exit once control returns
Regards,
Daniel
--
|: Red Hat, Engineering, Boston -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|