diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2019-04-10 11:15:11 +0200 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2019-04-10 12:12:37 +0200 |
commit | 772e5b0fdfc9dbd8bec070bd0c4c7eb5565df2ee (patch) | |
tree | b668b553234a2a49182c4c5b2b783b54c95a5302 | |
parent | 1493beba2aa03bdadeed8b4fa5d424df6e113071 (diff) |
_IceRead: Avoid possible use-after-free
`_IceRead()` gets called from multiple places which do not expect the
connection to be freed.
Do not free the connection data in `_IceRead()` to avoid potential
use-after-free issue in the various callers.
The connection data will be freed eventually in `ProcessWantToClose()`,
so not freeing it in `_IceRead()` should not introduce an memory leak.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-rw-r--r-- | src/misc.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -241,7 +241,6 @@ _IceRead ( */ _IceConnectionClosed (iceConn); /* invoke watch procs */ - _IceFreeConnection (iceConn); return (0); } |