projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d09257
)
sim900: Properly clean up device IOChannel on error
author
Denis Kenzior
<denkenz@gmail.com>
Tue, 26 Mar 2013 15:34:09 +0000
(10:34 -0500)
committer
Denis Kenzior
<denkenz@gmail.com>
Tue, 26 Mar 2013 15:34:09 +0000
(10:34 -0500)
plugins/sim900.c
patch
|
blob
|
history
diff --git
a/plugins/sim900.c
b/plugins/sim900.c
index de2a6f7ad69661c4ed72d123336bfbb900107211..52fc38ded44deee73afb0dd4b2f1e6be54ed8e21 100644
(file)
--- a/
plugins/sim900.c
+++ b/
plugins/sim900.c
@@
-139,8
+139,12
@@
static GAtChat *open_device(struct ofono_modem *modem,
chat = g_at_chat_new(channel, syntax);
g_at_syntax_unref(syntax);
- if (chat == NULL)
+ if (chat == NULL) {
+ g_io_channel_unref(data->device);
+ data->device = NULL;
+
return NULL;
+ }
if (getenv("OFONO_AT_DEBUG"))
g_at_chat_set_debug(chat, sim900_debug, debug);