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/config.h | |
| 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/config.h')
| -rw-r--r-- | src/config.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/config.h b/src/config.h index 278771a..b4ff616 100644 --- a/src/config.h +++ b/src/config.h @@ -181,6 +181,9 @@ struct lt_config_app { struct lt_thread *threads; struct lt_thread *iter; + + int notify_fd; + int notify_fd_watch; }; struct lt_config_ctl { @@ -326,7 +329,8 @@ int lt_run(struct lt_config_app *cfg); /* fifo */ int lt_fifo_create(struct lt_config_audit *cfg, char *dir); int lt_fifo_open(struct lt_config_app *cfg, char *dir, char *name); -int lt_fifo_notify_fd(struct lt_config_app *cfg, char *dir); +int lt_fifo_notify_init(struct lt_config_app *cfg, char *dir); +void lt_fifo_notify_cleanup(struct lt_config_app *cfg); int lt_fifo_send(struct lt_config_audit *cfg, int fd, char *buf, int len); int lt_fifo_recv(struct lt_config_app *cfg, struct lt_thread *t, void *buf, int bufsize); |
