summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
dc1c9a4)
Set the wait_node and ust_cmd pointers to NULL after they have been
free'd to make this function easier to follow. This may also help
scan-build analyze this function as it gets confused about the values
of those variables. Currently, scan-build (clang 8.0.1) reports a
use-after free of both variables when 'app' is simultaneously null and
non-null... you read that right.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
}
lttng_fd_put(LTTNG_FD_APPS, 1);
free(ust_cmd);
}
lttng_fd_put(LTTNG_FD_APPS, 1);
free(ust_cmd);
goto error;
}
CDS_INIT_LIST_HEAD(&wait_node->head);
goto error;
}
CDS_INIT_LIST_HEAD(&wait_node->head);
}
lttng_fd_put(LTTNG_FD_APPS, 1);
free(wait_node);
}
lttng_fd_put(LTTNG_FD_APPS, 1);
free(wait_node);
wait_queue.count++;
free(ust_cmd);
wait_queue.count++;
free(ust_cmd);
/*
* We have to continue here since we don't have the notify
* socket and the application MUST be added to the hash table
/*
* We have to continue here since we don't have the notify
* socket and the application MUST be added to the hash table
wait_queue.count--;
app = wait_node->app;
free(wait_node);
wait_queue.count--;
app = wait_node->app;
free(wait_node);
DBG3("UST app notify socket %d is set", ust_cmd->sock);
break;
}
DBG3("UST app notify socket %d is set", ust_cmd->sock);
break;
}
lttng_fd_put(LTTNG_FD_APPS, 1);
}
free(ust_cmd);
lttng_fd_put(LTTNG_FD_APPS, 1);
}
free(ust_cmd);