gsm_data: don't free a bts that's not even allocated yet

This commit is contained in:
Harald Welte 2011-06-06 17:52:56 +02:00
parent 5ac0179f47
commit 28307643d7
1 changed files with 1 additions and 3 deletions

View File

@ -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)