One pthread_create() RC check, one extra-initialized variable.
// the DW_AT_frame_base attribute expression's value first.
const Dwarf_Op *fb_ops;
Dwarf_Op *fb_expr;
- size_t fb_len;
+ size_t fb_len = 0;
if (this->fb_attr == NULL)
{
t_arg->addr = addr;
/* Handle the conncection */
+ int thread_rc = -1;
if (max_threads > 0)
/* Create the worker thread and handle the connection. */
- pthread_create(&tid, NULL, handle_connection, t_arg);
- else
+ thread_rc = pthread_create(&tid, NULL, handle_connection, t_arg);
+
+ if (thread_rc != 0)
/* Since max_threads == 0, don't spawn a new thread,
* just handle in the current thread. */
handle_connection(t_arg);