aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs/gb_proxy_peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gprs/gb_proxy_peer.c')
-rw-r--r--src/gprs/gb_proxy_peer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gprs/gb_proxy_peer.c b/src/gprs/gb_proxy_peer.c
index 5365ff0fa..890968717 100644
--- a/src/gprs/gb_proxy_peer.c
+++ b/src/gprs/gb_proxy_peer.c
@@ -177,6 +177,10 @@ struct gbproxy_peer *gbproxy_peer_alloc(struct gbproxy_config *cfg, uint16_t bvc
peer->bvci = bvci;
peer->ctrg = rate_ctr_group_alloc(peer, &peer_ctrg_desc, bvci);
+ if (!peer->ctrg) {
+ talloc_free(peer);
+ return NULL;
+ }
peer->cfg = cfg;
llist_add(&peer->list, &cfg->bts_peers);