ussd: check g_try_new0 return value

This commit is contained in:
Pekka Pessi 2010-10-06 18:01:40 +03:00 committed by Marcel Holtmann
parent 84888e9fa7
commit f1be4b2375
1 changed files with 3 additions and 0 deletions

View File

@ -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;