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
1 changed files with 6 additions and 2 deletions

View File

@ -635,11 +635,15 @@ static DBusMessage *dhcp4_config_request( const char *iface )
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 );
p_dbus_message_unref( reply );
if (!path) return NULL;
if (!path)
{
p_dbus_message_unref( reply );
return NULL;
}
request = p_dbus_message_new_method_call( "org.freedesktop.NetworkManager", path,
"org.freedesktop.DBus.Properties", "Get" );
p_dbus_message_unref( reply );
if (!request) return NULL;
p_dbus_message_iter_init_append( request, &iter );