summaryrefslogtreecommitdiffstats
path: root/src/gprs.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2011-01-26 14:51:50 -0600
committerDenis Kenzior <denkenz@gmail.com>2011-01-26 14:55:59 -0600
commita02387d0b520b1484d449600bd447839659d9191 (patch)
treeaa504d186c84ace266bfbec5c58ccc191d9d5757 /src/gprs.c
parent04ce2bd8cc0b9ea9265575d7423f573220d0a6b3 (diff)
downloadofono-a02387d0b520b1484d449600bd447839659d9191.tar.bz2
gprs: Put back the id if context creation fails
Diffstat (limited to 'src/gprs.c')
-rw-r--r--src/gprs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gprs.c b/src/gprs.c
index 1ec9f6e6..5ce4c8ab 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -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;
}