diff options
author | Kim Woelders <kim@woelders.dk> | 2010-10-30 10:00:13 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-08-26 15:40:08 -0700 |
commit | b17f93a1d041e63261ff63419796136a26489549 (patch) | |
tree | 32e0b7ac43890b88db3e97daf79bbffbad1b8673 | |
parent | a32df086f823099a5e0c00b20f0bb965fed5aa60 (diff) |
Fix some potential memory leaks in SmcCloseConnection().
Signed-off-by: Kim Woelders <kim@woelders.dk>
Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
-rw-r--r-- | src/sm_client.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sm_client.c b/src/sm_client.c index 7e9c986..13059ce 100644 --- a/src/sm_client.c +++ b/src/sm_client.c @@ -317,6 +317,22 @@ SmcCloseConnection(SmcConn smcConn, int count, char **reasonMsgs) if (smcConn->client_id) free (smcConn->client_id); + if (smcConn->interact_waits) + { + _SmcInteractWait *ptr = smcConn->interact_waits; + _SmcInteractWait *next; + + while (ptr) + { + next = ptr->next; + free ((char *) ptr); + ptr = next; + } + } + + if (smcConn->phase2_wait) + free (smcConn->phase2_wait); + if (smcConn->prop_reply_waits) { _SmcPropReplyWait *ptr = smcConn->prop_reply_waits; |