mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-08 18:28:03 +02:00
Fix double-free in error case.
Signed-off-by: Thiago Macieira <thiago@kde.org>
This commit is contained in:
parent
f4da942cb4
commit
3c657579a0
1 changed files with 1 additions and 3 deletions
|
|
@ -1288,16 +1288,14 @@ _dbus_transport_new_for_tcp_socket (const char *host,
|
|||
host, port);
|
||||
|
||||
transport = _dbus_transport_new_for_socket (fd, NULL, &address);
|
||||
_dbus_string_free (&address);
|
||||
if (transport == NULL)
|
||||
{
|
||||
dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
|
||||
_dbus_close_socket (fd, NULL);
|
||||
_dbus_string_free (&address);
|
||||
fd = -1;
|
||||
}
|
||||
|
||||
_dbus_string_free (&address);
|
||||
|
||||
return transport;
|
||||
|
||||
error:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue