Module: wine Branch: master Commit: b65ed8fa9b24709284a310328f97633df80f58ee URL: https://source.winehq.org/git/wine.git/?a=commit;h=b65ed8fa9b24709284a310328...
Author: Paul Gofman pgofman@codeweavers.com Date: Tue Dec 14 21:53:46 2021 +0300
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
---
dlls/mountmgr.sys/dbus.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/mountmgr.sys/dbus.c b/dlls/mountmgr.sys/dbus.c index 28b229f03d0..581d45e7702 100644 --- a/dlls/mountmgr.sys/dbus.c +++ b/dlls/mountmgr.sys/dbus.c @@ -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 );