* some iochannel fixes

* introduce reference counting in ioline
* fix memory leak in socket-client.c
* fix double-free error in protocol-esound.c


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@293 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2004-11-18 20:50:44 +00:00
parent eef235d879
commit 8641af3c6d
11 changed files with 240 additions and 145 deletions

View file

@ -330,6 +330,7 @@ struct pa_socket_client* pa_socket_client_new_string(struct pa_mainloop_api *m,
case KIND_TCP6: {
uint16_t port = default_port;
char *h;
int ret;
struct addrinfo hints, *res;
if (!(h = parse_address(p, &port)))
@ -338,7 +339,10 @@ struct pa_socket_client* pa_socket_client_new_string(struct pa_mainloop_api *m,
memset(&hints, 0, sizeof(hints));
hints.ai_family = kind == KIND_TCP4 ? AF_INET : (kind == KIND_TCP6 ? AF_INET6 : AF_UNSPEC);
if (getaddrinfo(h, NULL, &hints, &res) < 0 || !res || !res->ai_addr)
ret = getaddrinfo(h, NULL, &hints, &res);
pa_xfree(h);
if (ret < 0 || !res || !res->ai_addr)
return NULL;
if (res->ai_family == AF_INET) {