diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2018-05-08 20:03:14 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2018-05-08 20:03:14 (GMT) |
commit | 7855612da63e86b43a8a5beb0ad495e6605a2d93 (patch) | |
tree | 081fddea94545e59a0b323bef247f9616168bc09 /unix/tclEpollNotfy.c | |
parent | 7f26fedbccc3c9f7908417c0abe1cceae115a237 (diff) | |
download | tcl-7855612da63e86b43a8a5beb0ad495e6605a2d93.zip tcl-7855612da63e86b43a8a5beb0ad495e6605a2d93.tar.gz tcl-7855612da63e86b43a8a5beb0ad495e6605a2d93.tar.bz2 |
Fix epoll notifier memory leak in initialization/finalization routines,
Diffstat (limited to 'unix/tclEpollNotfy.c')
-rw-r--r-- | unix/tclEpollNotfy.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unix/tclEpollNotfy.c b/unix/tclEpollNotfy.c index 9d0053c..076e02b 100644 --- a/unix/tclEpollNotfy.c +++ b/unix/tclEpollNotfy.c @@ -88,6 +88,7 @@ typedef struct { LIST_HEAD(PlatformReadyFileHandlerList, FileHandler); typedef struct ThreadSpecificData { + FileHandler *triggerFilePtr; FileHandler *firstFileHandlerPtr; /* Pointer to head of file handler list. */ struct PlatformReadyFileHandlerList firstReadyFileHandlerPtr; @@ -306,6 +307,8 @@ PlatformEventsFinalize( tsdPtr->triggerPipe[1] = -1; } #endif /* HAVE_EVENTFD */ + ckfree(tsdPtr->triggerFilePtr->pedPtr); + ckfree(tsdPtr->triggerFilePtr); if (tsdPtr->eventsFd > 0) { close(tsdPtr->eventsFd); tsdPtr->eventsFd = 0; @@ -368,6 +371,7 @@ PlatformEventsInit( } filePtr->fd = tsdPtr->triggerPipe[0]; #endif + tsdPtr->triggerFilePtr = filePtr; if ((tsdPtr->eventsFd = epoll_create1(EPOLL_CLOEXEC)) == -1) { Tcl_Panic("epoll_create1: %s", strerror(errno)); } |