Fix: rculfhash: urcu_die() takes positive error value
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 11 Feb 2023 01:29:39 +0000 (20:29 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 11 Feb 2023 01:30:03 +0000 (20:30 -0500)
Found by Coverity:

** CID 1504537:  Error handling issues  (NEGATIVE_RETURNS)
/src/rculfhash.c: 1934 in do_auto_resize_destroy_cb()

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I6c130fc18fc36da8d0ed13188cc9415e7ee6104b

src/rculfhash.c

index 37fbc1b7c44c1ef5bcd347b19b7ef3a483d6c016..b45641524ec4a8d78f9244d1adfe886e98e19bda 100644 (file)
@@ -1931,7 +1931,7 @@ void do_auto_resize_destroy_cb(struct urcu_work *work)
        ht->flavor->register_thread();
        ret = cds_lfht_delete_bucket(ht);
        if (ret)
-               urcu_die(ret);
+               urcu_die(-ret);
        free_split_items_count(ht);
        ret = pthread_mutex_destroy(&ht->resize_mutex);
        if (ret)
This page took 0.025966 seconds and 4 git commands to generate.