gprs: Do not leak CID on failure to assign context

This commit is contained in:
Richard Röjfors 2019-08-06 23:11:09 +00:00 committed by Denis Kenzior
parent d4ced627e0
commit 5752702cbe
1 changed files with 3 additions and 0 deletions

View File

@ -271,6 +271,9 @@ static gboolean assign_context(struct pri_context *ctx, unsigned int use_cid)
return TRUE;
}
l_uintset_take(used_cids, ctx->context.cid);
ctx->context.cid = 0;
return FALSE;
}