rilmodem: use g_new0 instead of g_try_new0

This commit is contained in:
Denis Kenzior 2015-12-03 11:38:36 -06:00
parent 75d7ea8b7f
commit 69f6a77d78
1 changed files with 6 additions and 8 deletions

View File

@ -236,15 +236,13 @@ no_calls:
} else {
/* Get disconnect cause before calling core */
struct lastcause_req *reqdata =
g_try_new0(struct lastcause_req, 1);
if (reqdata != NULL) {
reqdata->vc = user_data;
reqdata->id = oc->id;
g_new0(struct lastcause_req, 1);
g_ril_send(vd->ril, reqid, NULL,
lastcause_cb, reqdata,
g_free);
}
reqdata->vc = user_data;
reqdata->id = oc->id;
g_ril_send(vd->ril, reqid, NULL,
lastcause_cb, reqdata, g_free);
}
clear_dtmf_queue(vd);