diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2020-03-10 22:59:19 +0100 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2020-03-10 23:03:03 +0100 |
commit | 00badebaac50245d141037005a4a108eac15f5bf (patch) | |
tree | 33de44b3c2fdeb3ad01e138a9898c1835cfa7697 | |
parent | bf0eaec4d96398e022646a875049d3174525b4b6 (diff) | |
download | dbus-00badebaac50245d141037005a4a108eac15f5bf.tar.gz |
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
-rw-r--r-- | dbus/dbus-sysdeps-win.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index c5a9d016..30cff66d 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -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; } |