mirror of git://git.sysmocom.de/ofono
ifxmodem: Use g_try_new0 when checking for the result
This commit is contained in:
parent
3d3c8b32ba
commit
df2d0dc805
|
@ -410,7 +410,7 @@ static int ifx_gprs_context_probe(struct ofono_gprs_context *gc,
|
|||
if (!g_at_chat_get_slave(chat))
|
||||
return -EINVAL;
|
||||
|
||||
gcd = g_new0(struct gprs_context_data, 1);
|
||||
gcd = g_try_new0(struct gprs_context_data, 1);
|
||||
if (!gcd)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
Loading…
Reference in New Issue