projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: rotation client example: leak of handle on error
[lttng-tools.git]
/
doc
/
examples
/
rotation
/
rotate-client-example.c
diff --git
a/doc/examples/rotation/rotate-client-example.c
b/doc/examples/rotation/rotate-client-example.c
index ae641d895040d9f36acad9fc4a97ac9839ea18e7..5cb0887bffa88503ca0000a62d6f9d1368fc435a 100644
(file)
--- a/
doc/examples/rotation/rotate-client-example.c
+++ b/
doc/examples/rotation/rotate-client-example.c
@@
-53,7
+53,7
@@
static int setup_session(const char *session_name, const char *path)
int ret;
struct lttng_domain dom;
struct lttng_event ev;
int ret;
struct lttng_domain dom;
struct lttng_event ev;
- struct lttng_handle *chan_handle;
+ struct lttng_handle *chan_handle
= NULL
;
printf("Creating session %s\n", session_name);
ret = lttng_create_session(session_name, path);
printf("Creating session %s\n", session_name);
ret = lttng_create_session(session_name, path);
@@
-90,11
+90,10
@@
static int setup_session(const char *session_name, const char *path)
goto end;
}
goto end;
}
- lttng_destroy_handle(chan_handle);
-
ret = 0;
end:
ret = 0;
end:
+ lttng_destroy_handle(chan_handle);
return ret;
}
return ret;
}
This page took
0.024291 seconds
and
4
git commands to generate.