From: Florian Forster Date: Mon, 29 Mar 2010 17:59:00 +0000 (+0200) Subject: ros_connect, create_socket: Free (struct addrinfo *). X-Git-Tag: librouteros-1.1.2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=3d7896a03cf97e96e2bc92b29aaf8c3b87384a1f;p=routeros-api.git ros_connect, create_socket: Free (struct addrinfo *). It was only freed in case of an error. --- diff --git a/src/main.c b/src/main.c index a8ecb43..e328ef8 100644 --- a/src/main.c +++ b/src/main.c @@ -643,11 +643,11 @@ static int create_socket (const char *node, const char *service) /* {{{ */ continue; } + freeaddrinfo (ai_list); return (fd); } freeaddrinfo (ai_list); - return (-1); } /* }}} int create_socket */