mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-04-05 07:50:38 +02:00
Fix missing release of the memory allocated in _dbus_connect_tcp_socket_with_nonce() in OOM case
If there is no more memory available within the mentiond function, e.g., when checking memory management, the release of memory allocated by getaddrinfo() is missing. Coverity CID: 354880
This commit is contained in:
parent
bf0eaec4d9
commit
00badebaac
1 changed files with 2 additions and 0 deletions
|
|
@ -1578,6 +1578,7 @@ _dbus_connect_tcp_socket_with_nonce (const char *host,
|
|||
|
||||
if (connect_error == NULL)
|
||||
{
|
||||
freeaddrinfo(ai);
|
||||
_DBUS_SET_OOM (error);
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -1592,6 +1593,7 @@ _dbus_connect_tcp_socket_with_nonce (const char *host,
|
|||
{
|
||||
dbus_error_free (connect_error);
|
||||
dbus_free (connect_error);
|
||||
freeaddrinfo(ai);
|
||||
_DBUS_SET_OOM (error);
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue