aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2009-12-23 23:35:51 +0100
committerHarald Welte <laforge@netfilter.org>2009-12-23 23:35:51 +0100
commita16ef3d23f31369399dd28b23a0c95648248cbf1 (patch)
tree89156a1b9fde7e8b765b706a3c933a5c9ee3a8f9
parent87ed5cd4ad0795d6d63b017e8811cc4bef646ec4 (diff)
ipaccess-proxy: Fix two memory leaks
-rw-r--r--openbsc/src/ipaccess-proxy.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/openbsc/src/ipaccess-proxy.c b/openbsc/src/ipaccess-proxy.c
index 6e0ce6ae4..dd9d6b1b5 100644
--- a/openbsc/src/ipaccess-proxy.c
+++ b/openbsc/src/ipaccess-proxy.c
@@ -245,7 +245,7 @@ static int store_idtags(struct ipa_bts_conn *ipbc, struct tlv_parsed *tlvp)
ipbc->id_tags[i] = talloc_size(tall_bsc_ctx, len);
else
#endif
- ipbc->id_tags[i] = talloc_realloc_size(tall_bsc_ctx,
+ ipbc->id_tags[i] = talloc_realloc_size(ipbc,
ipbc->id_tags[i], len);
if (!ipbc->id_tags[i])
return -ENOMEM;
@@ -807,14 +807,11 @@ static int handle_tcp_read(struct bsc_fd *bfd)
struct ipa_proxy_conn *ipc = bfd->data;
struct ipa_bts_conn *ipbc = ipc->bts_conn;
struct ipa_proxy_conn *bsc_conn;
- struct msgb *msg = msgb_alloc(PROXY_ALLOC_SIZE, "Abis/IP");
+ struct msgb *msg;
struct ipaccess_head *hh;
int ret = 0;
char *btsbsc;
- if (!msg)
- return -ENOMEM;
-
if ((bfd->priv_nr & 0xff) <= 2)
btsbsc = "BTS";
else