projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: lttng-crash: DIR leak in delete_trace() on error
[lttng-tools.git]
/
src
/
bin
/
lttng-crash
/
lttng-crash.c
diff --git
a/src/bin/lttng-crash/lttng-crash.c
b/src/bin/lttng-crash/lttng-crash.c
index c3a8b778925d1de9bed8d191b1eec1324f982d2b..4d186dd557fb995ecbfd3b29f8637d63110b59d2 100644
(file)
--- a/
src/bin/lttng-crash/lttng-crash.c
+++ b/
src/bin/lttng-crash/lttng-crash.c
@@
-1062,12
+1062,14
@@
int delete_trace(const char *trace_path)
trace_dir = opendir(trace_path);
if (!trace_dir) {
PERROR("Cannot open '%s' path", trace_path);
trace_dir = opendir(trace_path);
if (!trace_dir) {
PERROR("Cannot open '%s' path", trace_path);
- return -1;
+ ret = -errno;
+ goto end;
}
trace_dir_fd = dirfd(trace_dir);
if (trace_dir_fd < 0) {
PERROR("dirfd");
}
trace_dir_fd = dirfd(trace_dir);
if (trace_dir_fd < 0) {
PERROR("dirfd");
- return -1;
+ ret = -errno;
+ goto end;
}
while ((entry = readdir(trace_dir))) {
}
while ((entry = readdir(trace_dir))) {
This page took
0.023002 seconds
and
4
git commands to generate.