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:
9b8d821
)
Fix: Use g_try_malloc in gisi/pipe.c
author
Denis Kenzior
<denkenz@gmail.com>
Tue, 16 Mar 2010 22:37:44 +0000
(17:37 -0500)
committer
Denis Kenzior
<denkenz@gmail.com>
Tue, 16 Mar 2010 22:37:44 +0000
(17:37 -0500)
gisi/pipe.c
patch
|
blob
|
history
diff --git
a/gisi/pipe.c
b/gisi/pipe.c
index
e2b741e
..
0e7698d
100644
(file)
--- a/
gisi/pipe.c
+++ b/
gisi/pipe.c
@@
-211,7
+211,10
@@
GIsiPipe *g_isi_pipe_create(GIsiModem *modem, void (*created)(GIsiPipe *),
.type2 = type2,
.n_sb = 0,
};
- GIsiPipe *pipe = g_malloc(sizeof(*pipe));
+ GIsiPipe *pipe = g_try_malloc(sizeof(GIsiPipe));
+
+ if (pipe == NULL)
+ return NULL;
pipe->client = g_isi_client_create(modem, PN_PIPE);
pipe->handler = created;