SignonAuthProvider: fix ref counting issue

The account data was unreferenced once too often, or rather, a suitable ref
count increase was missing. A debug build of glib detects that ("GLib:
g_variant_unref: assertion 'value->ref_count > 0' failed"), but without that
check the code might also crash.
This commit is contained in:
Patrick Ohly 2016-11-03 00:50:26 -07:00
parent 7f3ec05c05
commit 5937277102
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ private:
// so we have to use the "steal" variant to enable that assignment.
GVariantStealCXX resultData;
GErrorCXX gerror;
GVariantCXX sessionData(ag_auth_data_get_login_parameters(m_authData, extraOptions), TRANSFER_REF);
GVariantCXX sessionData(g_variant_ref_sink(ag_auth_data_get_login_parameters(m_authData, extraOptions)), TRANSFER_REF);
const char *mechanism = ag_auth_data_get_mechanism(m_authData);
PlainGStr buffer(g_variant_print(sessionData, true));
SE_LOG_DEBUG(NULL, "asking for authentication with method %s, mechanism %s and parameters %s",