summaryrefslogtreecommitdiffstats
path: root/src/run.c
diff options
context:
space:
mode:
authorJiri Olsa <Jiri Olsa jolsa@redhat.com>2011-11-13 15:41:29 +0100
committerJiri Olsa <Jiri Olsa jolsa@redhat.com>2011-11-13 15:41:29 +0100
commitcd4cfc841b45022d113b39a2ecefc6951a22c5fe (patch)
tree66d609e305becc3ea5a798cf0e11145bf709adc3 /src/run.c
parent01166acb9da9ea2aea40349c44d78764f8e2f3cd (diff)
downloadlatrace-notify_leak.tar.gz
latrace-notify_leak.tar.xz
latrace-notify_leak.zip
fifo: Fix leak of notify watchnotify_leak1notify_leak
The watch descriptor was not properly released. Added proper cleanup for both inotify fd and the watch descriptor.
Diffstat (limited to 'src/run.c')
-rw-r--r--src/run.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/run.c b/src/run.c
index 3f1eb2d..fa50a3f 100644
--- a/src/run.c
+++ b/src/run.c
@@ -340,7 +340,7 @@ static int run_setup(struct lt_config_app *cfg,
/* new thread notification descriptor */
if (lt_sh(cfg, pipe) &&
- (-1 == (pa->fd_notify = lt_fifo_notify_fd(cfg, pa->dir))))
+ (-1 == (pa->fd_notify = lt_fifo_notify_init(cfg, pa->dir))))
return -1;
/* tty master descriptor */
@@ -355,7 +355,7 @@ static void run_cleanup(struct lt_config_app *cfg,
struct lt_process_args *pa)
{
if (lt_sh(cfg, pipe))
- close(pa->fd_notify);
+ lt_fifo_notify_cleanup(cfg);
if (cfg->output_tty)
tty_close(cfg);