summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2019-04-10 11:15:11 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2019-04-10 12:12:37 +0200
commit772e5b0fdfc9dbd8bec070bd0c4c7eb5565df2ee (patch)
treeb668b553234a2a49182c4c5b2b783b54c95a5302
parent1493beba2aa03bdadeed8b4fa5d424df6e113071 (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.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/misc.c b/src/misc.c
index 0d5fadd..befa2c5 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -241,7 +241,6 @@ _IceRead (
*/
_IceConnectionClosed (iceConn); /* invoke watch procs */
- _IceFreeConnection (iceConn);
return (0);
}