diff mbox series

[4/5] gobi: Replace g_try_new0 / g_free with ell equivalents

Message ID 20240304203506.1725220-4-denkenz@gmail.com (mailing list archive)
State Accepted
Commit 9eb530b941105a4326319d0c59c508c4ce7803a6
Headers show
Series [1/5] qmimodem: Use stdbool instead of gboolean | expand

Commit Message

Denis Kenzior March 4, 2024, 8:34 p.m. UTC
---
 plugins/gobi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/plugins/gobi.c b/plugins/gobi.c
index 99a7d5564ed8..8d3b7ef4cdfc 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -101,9 +101,7 @@  static int gobi_probe(struct ofono_modem *modem)
 
 	DBG("%p", modem);
 
-	data = g_try_new0(struct gobi_data, 1);
-	if (!data)
-		return -ENOMEM;
+	data = l_new(struct gobi_data, 1);
 
 	kernel_driver = ofono_modem_get_string(modem, "KernelDriver");
 	DBG("kernel_driver: %s", kernel_driver);
@@ -149,7 +147,7 @@  static void gobi_remove(struct ofono_modem *modem)
 
 	qmi_device_free(data->device);
 
-	g_free(data);
+	l_free(data);
 }
 
 static void shutdown_cb(void *user_data)