gprs: Put back the id if context creation fails

This commit is contained in:
Denis Kenzior 2011-01-26 14:51:50 -06:00
parent 04ce2bd8cc
commit a02387d0b5
1 changed files with 1 additions and 0 deletions

View File

@ -1634,6 +1634,7 @@ static struct pri_context *add_context(struct ofono_gprs *gprs,
context = pri_context_create(gprs, name, type);
if (context == NULL) {
idmap_put(gprs->pid_map, id);
ofono_error("Unable to allocate context struct");
return NULL;
}