From a51018daec6f563f9e74d37747c09d4f10ed7958 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 10 Feb 2023 20:29:39 -0500 Subject: [PATCH] Fix: rculfhash: urcu_die() takes positive error value 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 Change-Id: I6c130fc18fc36da8d0ed13188cc9415e7ee6104b --- src/rculfhash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rculfhash.c b/src/rculfhash.c index 37fbc1b..b456415 100644 --- a/src/rculfhash.c +++ b/src/rculfhash.c @@ -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) -- 2.39.5