Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH 1/2] gisi/verify: check g_try_new0 return value
@ 2010-10-06 15:01 Pekka.Pessi
  2010-10-06 15:01 ` [PATCH 2/2] ussd: " Pekka.Pessi
  2010-10-06 15:26 ` [PATCH 1/2] gisi/verify: " Marcel Holtmann
  0 siblings, 2 replies; 4+ messages in thread
From: Pekka.Pessi @ 2010-10-06 15:01 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 gisi/verify.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gisi/verify.c b/gisi/verify.c
index fae9d13..322f1d1 100644
--- a/gisi/verify.c
+++ b/gisi/verify.c
@@ -116,6 +116,9 @@ GIsiRequest *g_isi_verify(GIsiClient *client, GIsiVerifyFunc func,
 	struct verify_data *data = g_try_new0(struct verify_data, 1);
 	GIsiRequest *req = NULL;
 
+	if (data == NULL)
+		return NULL;
+
 	data->func = func;
 	data->data = opaque;
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ussd: check g_try_new0 return value
  2010-10-06 15:01 [PATCH 1/2] gisi/verify: check g_try_new0 return value Pekka.Pessi
@ 2010-10-06 15:01 ` Pekka.Pessi
  2010-10-06 15:27   ` Marcel Holtmann
  2010-10-06 15:26 ` [PATCH 1/2] gisi/verify: " Marcel Holtmann
  1 sibling, 1 reply; 4+ messages in thread
From: Pekka.Pessi @ 2010-10-06 15:01 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 src/ussd.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/ussd.c b/src/ussd.c
index aad7d32..c80d247 100644
--- a/src/ussd.c
+++ b/src/ussd.c
@@ -888,6 +888,9 @@ int __ofono_ussd_initiate(struct ofono_ussd *ussd, int dcs,
 		return -EBUSY;
 
 	req = g_try_new0(struct ussd_request, 1);
+	if (req == NULL)
+		return -ENOMEM;
+
 	req->cb = cb;
 	req->user_data = user_data;
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] gisi/verify: check g_try_new0 return value
  2010-10-06 15:01 [PATCH 1/2] gisi/verify: check g_try_new0 return value Pekka.Pessi
  2010-10-06 15:01 ` [PATCH 2/2] ussd: " Pekka.Pessi
@ 2010-10-06 15:26 ` Marcel Holtmann
  1 sibling, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2010-10-06 15:26 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]

Hi Pekka,

>  gisi/verify.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)

patch has been applied. Thanks.

Regards

Marcel



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] ussd: check g_try_new0 return value
  2010-10-06 15:01 ` [PATCH 2/2] ussd: " Pekka.Pessi
@ 2010-10-06 15:27   ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2010-10-06 15:27 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 152 bytes --]

Hi Pekka,

>  src/ussd.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)

patch has been applied. Thanks.

Regards

Marcel



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-06 15:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-06 15:01 [PATCH 1/2] gisi/verify: check g_try_new0 return value Pekka.Pessi
2010-10-06 15:01 ` [PATCH 2/2] ussd: " Pekka.Pessi
2010-10-06 15:27   ` Marcel Holtmann
2010-10-06 15:26 ` [PATCH 1/2] gisi/verify: " Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox