dispatcher: fix abort in case of an error (rh #1275813)

request_free() can be called on an error.

Oct 27 20:27:46 localhost.localdomain nm-dispatcher[2328]: #1 'pre-up': completed: invalid request: Missing or invalid required value path!
Oct 27 20:27:46 localhost.localdomain nm-dispatcher[2328]: **
Oct 27 20:27:46 localhost.localdomain nm-dispatcher[2328]: ERROR:nm-dispatcher.c:203:request_free: assertion failed (request->num_scripts_done == request->scripts->len): (0 == 1)

Fixes: 1999723241

https://bugzilla.redhat.com/show_bug.cgi?id=1275813
This commit is contained in:
Jiří Klimeš
2015-10-30 13:44:15 +01:00
parent b42098f4d0
commit 6cd5cc595f

View File

@@ -720,6 +720,7 @@ handle_action (NMDBusDispatcher *dbus_dispatcher,
results = g_variant_new_array (G_VARIANT_TYPE ("(sus)"), NULL, 0);
g_dbus_method_invocation_return_value (context, g_variant_new ("(@a(sus))", results));
request->num_scripts_done = request->scripts->len;
request_free (request);
return TRUE;
}