m-modem-manager: Don't leak error

And include the error message while we're at it.

Fixes: 2794764d5a (m-modem-manager: add module for tracking status of voice calls)

Signed-off-by: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu>
This commit is contained in:
Evangelos Ribeiro Tzaras 2025-11-25 10:48:57 +01:00 committed by George Kiagiadakis
parent 278541f637
commit 9045d2439a

View file

@ -103,14 +103,15 @@ static void
bind_call (GObject * obj, GAsyncResult * res, gpointer data) bind_call (GObject * obj, GAsyncResult * res, gpointer data)
{ {
WpModemManager *wpmm = WP_MODEM_MANAGER (data); WpModemManager *wpmm = WP_MODEM_MANAGER (data);
GError *err = NULL; g_autoptr (GError) err = NULL;
GDBusProxy *call; GDBusProxy *call;
GVariant *prop; GVariant *prop;
gint init_state; gint init_state;
call = g_dbus_proxy_new_finish (res, &err); call = g_dbus_proxy_new_finish (res, &err);
if (call == NULL) { if (call == NULL) {
wp_warning_object (wpmm, "Failed to get call"); g_prefix_error (&err, "Failed to get call: ");
wp_warning_object (wpmm, "%s", err->message);
return; return;
} }