diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-03-16 17:37:44 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-03-16 17:37:44 -0500 |
commit | 8987fb696c1ccffd29b333ef89e787237cbbfee7 (patch) | |
tree | 42b9b8c47dcd4ee2ba1a0d5b58c785a58c7dfea3 /gisi/pipe.c | |
parent | 9b8d8218a52b02b87648c306c8692daee205509b (diff) | |
download | ofono-8987fb696c1ccffd29b333ef89e787237cbbfee7.tar.gz |
Fix: Use g_try_malloc in gisi/pipe.c
Diffstat (limited to 'gisi/pipe.c')
-rw-r--r-- | gisi/pipe.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gisi/pipe.c b/gisi/pipe.c index e2b741e4..0e7698d2 100644 --- 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; |