Fix: provide errno as argument to urcu_die()
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 19 Sep 2019 14:10:31 +0000 (10:10 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 19 Sep 2019 14:12:21 +0000 (10:12 -0400)
commit 1a990de3add "Fix: rculfhash worker needs to unblock to SIGRCU"
provides "ret" (-1) as argument to urcu_die(), but should rather provide
errno.

Reported by Coverity:

** CID 1405700:  Error handling issues  (NEGATIVE_RETURNS) /src/rculfhash.c: 2171 in cds_lfht_worker_init()

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/rculfhash.c

index 17d31430f83653b3f309945f0e569e3af89db348..595062610c9a8556c77e5b58a1e57f6c492997c4 100644 (file)
@@ -2123,7 +2123,7 @@ static void cds_lfht_worker_init(struct urcu_workqueue *workqueue,
                urcu_die(errno);
        ret = sigdelset(&mask, SIGRCU);
        if (ret)
-               urcu_die(ret);
+               urcu_die(errno);
        ret = pthread_sigmask(SIG_SETMASK, &mask, NULL);
        if (ret)
                urcu_die(ret);
This page took 0.026717 seconds and 4 git commands to generate.