NULL,
&error);
if (!msg) {
- printf("LoadUnit method call error: %s\n", error->message);
+ if (error) {
+ printf("LoadUnit method call error: %s\n", error->message);
+ g_error_free(error);
+ } else {
+ printf("LoadUnit method call error\n");
+ }
+
goto cleanup;
}
g_variant_get(msg, "(o)", &path);
- error = NULL;
/* PropertiesChanged signal subscribe */
ctx->subscription_id = g_dbus_connection_signal_subscribe(
ctx->bus,
NULL
);
if (ctx->subscription_id == 0) {
- printf("signal subscription error: %s\n", error->message);
+ printf("signal subscription error\n");
goto cleanup;
}