diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-12-29 16:24:56 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-12-29 16:24:56 -0500 |
commit | 7e5958dd17125eb2c2724644f2e42d7228417af7 (patch) | |
tree | 7a1aca67517a689a54c6dab8a2b4b74a1d8f060e | |
parent | 307e9d0956d32bcf12b20400386289baab23223a (diff) |
trace-cmd: Do not close dir if it was not opened
The fix for a memory leak with closedir incorrectly added the close
in the fail path. There is no failure condition after the opendir.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/trace-util.c b/trace-util.c index 520f800..7a75056 100644 --- a/trace-util.c +++ b/trace-util.c | |||
@@ -263,9 +263,9 @@ int trace_load_plugins(struct pevent *pevent) | |||
263 | load_plugin(pevent, path, name); | 263 | load_plugin(pevent, path, name); |
264 | } | 264 | } |
265 | 265 | ||
266 | closedir(dir); | ||
266 | fail: | 267 | fail: |
267 | free(path); | 268 | free(path); |
268 | closedir(dir); | ||
269 | 269 | ||
270 | return -1; | 270 | return -1; |
271 | } | 271 | } |