lib: Make varsubst_basearch propagate errors

Shouldn't happen, but it's better than aborting.
This commit is contained in:
Colin Walters 2020-12-18 21:18:39 +00:00 committed by OpenShift Merge Robot
parent f35afb197d
commit a3e2853942

View File

@ -130,10 +130,10 @@ rpm_ostree_get_basearch (void)
char *
rpm_ostree_varsubst_basearch (const char *src, GError **error)
{
g_autoptr(GError) local_error = NULL;
char *args[] = { "varsubst-basearch", (char*)src, NULL };
g_autoptr(GVariant) ret = _rpmostree_shlib_ipc_send ("s", args, NULL, &local_error);
g_assert_no_error (local_error);
g_autoptr(GVariant) ret = _rpmostree_shlib_ipc_send ("s", args, NULL, error);
if (!ret)
return NULL;
return g_variant_dup_string (ret, NULL);
}