Two possible error can occur here where the malloc() failed or the
tracer is gone (app unregistered) so two error code is needed.
Signed-off-by: David Goulet <dgoulet@efficios.com>
ret = ustctl_create_session(app->key.sock);
if (ret < 0) {
ERR("Creating session for app pid %d", app->key.pid);
+ /* This means that the tracer is gone... */
+ ua_sess = (void*) -1UL;
goto error;
}
*/
ua_sess = create_ust_app_session(usess, app);
if (ua_sess == NULL) {
- /* Major problem here and it's maybe the tracer or malloc() */
+ /* The malloc() failed. */
goto error;
+ } else if (ua_sess == (void *) -1UL) {
+ /* The application's socket is not valid. Contiuing */
+ continue;
}
/* Create channel onto application */