}
free(tmp_event);
release_ret = ustctl_release_handle(app->sock, handle);
- if (release_ret != -LTTNG_UST_ERR_EXITING && release_ret != -EPIPE) {
+ if (release_ret < 0 &&
+ release_ret != -LTTNG_UST_ERR_EXITING &&
+ release_ret != -EPIPE) {
ERR("Error releasing app handle for app %d with ret %d", app->sock, release_ret);
}
pthread_mutex_unlock(&app->sock_lock);
free(tmp_event);
ret = -ENOMEM;
release_ret = ustctl_release_handle(app->sock, handle);
- if (release_ret != -LTTNG_UST_ERR_EXITING && release_ret != -EPIPE) {
+ if (release_ret < 0 &&
+ release_ret != -LTTNG_UST_ERR_EXITING &&
+ release_ret != -EPIPE) {
ERR("Error releasing app handle for app %d with ret %d", app->sock, release_ret);
}
pthread_mutex_unlock(&app->sock_lock);
}
ret = ustctl_release_handle(app->sock, handle);
pthread_mutex_unlock(&app->sock_lock);
- if (ret != -LTTNG_UST_ERR_EXITING && ret != -EPIPE) {
+ if (ret < 0 && ret != -LTTNG_UST_ERR_EXITING && ret != -EPIPE) {
ERR("Error releasing app handle for app %d with ret %d", app->sock, ret);
}
}
free(tmp_event);
release_ret = ustctl_release_handle(app->sock, handle);
pthread_mutex_unlock(&app->sock_lock);
- if (release_ret != -LTTNG_UST_ERR_EXITING && release_ret != -EPIPE) {
+ if (release_ret < 0 &&
+ release_ret != -LTTNG_UST_ERR_EXITING &&
+ release_ret != -EPIPE) {
ERR("Error releasing app handle for app %d with ret %d", app->sock, release_ret);
}
goto rcu_error;
ret = -ENOMEM;
release_ret = ustctl_release_handle(app->sock, handle);
pthread_mutex_unlock(&app->sock_lock);
- if (release_ret != -LTTNG_UST_ERR_EXITING && release_ret != -EPIPE) {
+ if (release_ret &&
+ release_ret != -LTTNG_UST_ERR_EXITING &&
+ release_ret != -EPIPE) {
ERR("Error releasing app handle for app %d with ret %d", app->sock, release_ret);
}
goto rcu_error;
}
ret = ustctl_release_handle(app->sock, handle);
pthread_mutex_unlock(&app->sock_lock);
- if (ret != -LTTNG_UST_ERR_EXITING && ret != -EPIPE) {
+ if (ret < 0 &&
+ ret != -LTTNG_UST_ERR_EXITING &&
+ ret != -EPIPE) {
ERR("Error releasing app handle for app %d with ret %d", app->sock, ret);
}
}