When find_or_create_ust_app_session() fails, it doesn't populate its
return parameter. Therefore, it is unnecessary to destroy the app
session when it returns < 0.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I8f5cc75f718d96d32fb67fc67135034eb95365d7
ret = find_or_create_ust_app_session(usess, app, &ua_sess, nullptr);
if (ret < 0) {
/* Tracer is probably gone or ENOMEM. */
- if (ua_sess) {
- destroy_app_session(app, ua_sess);
- }
goto end;
}
+
LTTNG_ASSERT(ua_sess);
pthread_mutex_lock(&ua_sess->lock);