X-Git-Url: http://git.liburcu.org/?p=lttng-tools.git;a=blobdiff_plain;f=doc%2Fexamples%2Frotation%2Frotate-client-example.c;fp=doc%2Fexamples%2Frotation%2Frotate-client-example.c;h=34287e8bb6e0f2a38ceb64a959d445bfc0e16b07;hp=a9d8b9f311a7edbbb1a94c642075134724a1d83c;hb=5144ff0ada9269fe941c3150c061fa5393926a23;hpb=6ee599289b90a9b539f0683903a0ff320573afa6 diff --git a/doc/examples/rotation/rotate-client-example.c b/doc/examples/rotation/rotate-client-example.c index a9d8b9f31..34287e8bb 100644 --- a/doc/examples/rotation/rotate-client-example.c +++ b/doc/examples/rotation/rotate-client-example.c @@ -61,7 +61,7 @@ int setup_session(const char *session_name, const char *path) 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); @@ -98,11 +98,10 @@ int setup_session(const char *session_name, const char *path) goto end; } - lttng_destroy_handle(chan_handle); - ret = 0; end: + lttng_destroy_handle(chan_handle); return ret; }