osmo_sock_init(): Fix memory leak in error path

We forgot to call freeaddrinfo() in an error path.

Change-Id: Iccbd3beef4c4a70dc443131b909c45e650d8c6a2
Fixes: Coverity CID 135217
This commit is contained in:
Harald Welte 2016-11-26 10:18:24 +01:00
parent 9d862c8998
commit 0fc315dd9e
1 changed files with 1 additions and 0 deletions

View File

@ -118,6 +118,7 @@ int osmo_sock_init(uint16_t family, uint16_t type, uint8_t proto,
" %s:%u: %s\n",
host, port, strerror(errno));
close(sfd);
freeaddrinfo(result);
return -EINVAL;
}
}