Skip to content

Commit 2f90ca0

Browse files
authored
Merge pull request #2226 from 0intro/msg-handler-error
Handle errors returned by msg_handler
2 parents 813cffe + 4419699 commit 2f90ca0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/OVAL/probes/probe/worker.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ void *probe_worker_runfn(void *arg)
103103
//
104104
dD("handler result = %p, return code = %d", probe_res, probe_ret);
105105

106+
if (probe_res == NULL) {
107+
dE("An error was returned by the input message handler: %s.", strerror(errno));
108+
exit(1);
109+
}
110+
106111
/* Assuming that the red-black tree API is doing locking for us... */
107112
if (rbt_i32_del(pair->probe->workers, pair->pth->sid, NULL) != 0) {
108113
dW("thread not found in the probe thread tree, probably canceled by an external signal");

0 commit comments

Comments
 (0)