Commit dbc5925e authored by Miloslav Trmač's avatar Miloslav Trmač Committed by Ray Strode

Fix error handling in polkit_authority_enumerate_temporary_authorizations_finish

Fix memory leaks, and don't return a pointer to freed memory.

https://bugs.freedesktop.org/show_bug.cgi?id=99741Signed-off-by: default avatarMiloslav Trmač <mitr@redhat.com>
parent 08fe855c
......@@ -1698,11 +1698,13 @@ polkit_authority_enumerate_temporary_authorizations_finish (PolkitAuthority *aut
g_prefix_error (error, "Error serializing return value of EnumerateTemporaryAuthorizations: ");
g_list_foreach (ret, (GFunc) g_object_unref, NULL);
g_list_free (ret);
goto out;
ret = NULL;
goto out_array;
}
ret = g_list_prepend (ret, auth);
}
ret = g_list_reverse (ret);
out_array:
g_variant_unref (array);
g_variant_unref (value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment