mountmgr.sys: Avoid use after free in dhcp4_config_request().

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2021-12-14 21:53:46 +03:00 committed by Alexandre Julliard
parent 288093229d
commit b65ed8fa9b

View file

@ -635,11 +635,15 @@ static DBusMessage *dhcp4_config_request( const char *iface )
p_dbus_message_iter_init( reply, &iter ); p_dbus_message_iter_init( reply, &iter );
if (p_dbus_message_iter_get_arg_type( &iter ) == DBUS_TYPE_OBJECT_PATH) p_dbus_message_iter_get_basic( &iter, &path ); if (p_dbus_message_iter_get_arg_type( &iter ) == DBUS_TYPE_OBJECT_PATH) p_dbus_message_iter_get_basic( &iter, &path );
p_dbus_message_unref( reply ); if (!path)
if (!path) return NULL; {
p_dbus_message_unref( reply );
return NULL;
}
request = p_dbus_message_new_method_call( "org.freedesktop.NetworkManager", path, request = p_dbus_message_new_method_call( "org.freedesktop.NetworkManager", path,
"org.freedesktop.DBus.Properties", "Get" ); "org.freedesktop.DBus.Properties", "Get" );
p_dbus_message_unref( reply );
if (!request) return NULL; if (!request) return NULL;
p_dbus_message_iter_init_append( request, &iter ); p_dbus_message_iter_init_append( request, &iter );