After a list iteration, the pointer is not null, so the unlock would
trigger.
The second path modified does 2 unlock when taking the if () branch.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
DBG("Channel found, updating kernel streams");
ret = kernel_open_channel_stream(channel);
if (ret < 0) {
- goto end;
+ goto error;
}
/*
ret = send_kconsumerd_channel_fds(session->kernel_session->consumer_fd,
channel);
if (ret < 0) {
- goto end;
+ goto error;
}
}
- goto end;
+ goto error;
}
}
unlock_session(session);
}
+ unlock_session_list();
+ return ret;
-end:
+error:
+ unlock_session(session);
unlock_session_list();
- if (session) {
- unlock_session(session);
- }
return ret;
}
DBG("PID %d unregistered with sock %d", lta->pid, sock);
close(lta->sock);
del_traceable_app(lta);
- unlock_apps_list();
free(lta);
}
unlock_apps_list();