gdbusauth: plug memory leak

Happens when the waiting-for-auth state is re-entered:

SERVER_STATE_WAITING_FOR_AUTH
  |
  v
G_DBUS_AUTH_MECHANISM_STATE_REJECTED
  |
  v
SERVER_STATE_WAITING_FOR_AUTH

Causing the previous `mech` pointer to get overwritten.

https://bugzilla.gnome.org/show_bug.cgi?id=778991
This commit is contained in:
Ole André Vadla Ravnås 2017-02-21 02:20:52 +01:00 committed by Philip Withnall
parent 77945667f7
commit 8693d60a28

View File

@ -1132,6 +1132,7 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
gchar *initial_response;
gsize initial_response_len;
g_clear_object (&mech);
mech = g_object_new (auth_mech_to_use_gtype,
"stream", auth->priv->stream,
"credentials", credentials,