WARN("Session name %s not found", session_name);
break;
default:
+ ERR("%s", lttng_strerror(ret));
break;
}
goto error;
count = lttng_list_sessions(&sessions);
if (count == 0) {
MSG("No session found, nothing to do.");
+ } else if (count < 0) {
+ ERR("%s", lttng_strerror(ret));
+ goto error;
}
+
for (i = 0; i < count; i++) {
ret = destroy_session(sessions[i].name);
if (ret < 0) {