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:10:31 +0000 (10:10 -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 5b3c06b5a85ab6047cf133b3aea0ae1d0d955015..811d5156ccdebc06679758ea282c9df22060fd16 100644 (file)
@@ -2168,7 +2168,7 @@ static void cds_lfht_worker_init(struct urcu_workqueue *workqueue,
                urcu_die(errno);
        ret = sigdelset(&mask, SIGRCU);
        if (ret)
                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);
        ret = pthread_sigmask(SIG_SETMASK, &mask, NULL);
        if (ret)
                urcu_die(ret);
This page took 0.027204 seconds and 4 git commands to generate.