summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-26 10:18:24 +0100
committerHarald Welte <laforge@gnumonks.org>2016-11-26 10:24:19 +0100
commit0fc315dd9ed35ab9d32b60cbcd225f413b6a601e (patch)
treef619e334cb3ebbf3efe5a153995003a88d44b10b
parent9d862c89989e5841a2242ed0cde0e6fa0f4a6d2e (diff)
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
-rw-r--r--src/socket.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/socket.c b/src/socket.c
index 19c513a8..cdafadd0 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -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;
}
}