diff options
| author | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2011-11-13 15:41:29 +0100 |
|---|---|---|
| committer | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2011-11-13 15:41:29 +0100 |
| commit | cd4cfc841b45022d113b39a2ecefc6951a22c5fe (patch) | |
| tree | 66d609e305becc3ea5a798cf0e11145bf709adc3 /src/run.c | |
| parent | 01166acb9da9ea2aea40349c44d78764f8e2f3cd (diff) | |
| download | latrace-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |
