This has been updated in upstream master (see commit:
0f83395d5e0e927fdab025eae023e68e9021af26).
There was also a check missing at one of the callsite.
http://lists.lttng.org/pipermail/lttng-dev/2012-December/019208.html
Reported-by: David OShea <David.OShea@quantum.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
if (ret < 0) {
ERR("Creating session for app pid %d", app->pid);
/* This means that the tracer is gone... */
+ delete_ust_app_session(-1, ua_sess);
ua_sess = (void*) -1UL;
- goto error;
+ goto end;
}
ua_sess->handle = ret;
end:
return ua_sess;
-
-error:
- delete_ust_app_session(-1, ua_sess);
- return NULL;
}
/*
}
ua_sess = create_ust_app_session(usess, app);
- if (ua_sess == NULL) {
+ if (ua_sess == NULL || ua_sess == (void *) -1UL) {
goto error;
}