aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-06-06 17:52:56 +0200
committerHarald Welte <laforge@gnumonks.org>2011-06-06 17:52:56 +0200
commit28307643d79857b703d335cd46f70d748787a41a (patch)
treec8a52901639d400445afd80edefdb6047df127b2
parent5ac0179f4753da85d770c7c057e80d4fc35c3733 (diff)
gsm_data: don't free a bts that's not even allocated yet
-rw-r--r--openbsc/src/libcommon/gsm_data.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c
index 268137f0..6b15bd06 100644
--- a/openbsc/src/libcommon/gsm_data.c
+++ b/openbsc/src/libcommon/gsm_data.c
@@ -364,10 +364,8 @@ struct gsm_bts *gsm_bts_alloc_register(struct gsm_network *net, enum gsm_bts_typ
struct gsm_bts_model *model = bts_model_find(type);
struct gsm_bts *bts;
- if (!model && type != GSM_BTS_TYPE_UNKNOWN) {
- talloc_free(bts);
+ if (!model && type != GSM_BTS_TYPE_UNKNOWN)
return NULL;
- }
bts = gsm_bts_alloc(net);
if (!bts)