aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/astobj2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/astobj2.c b/main/astobj2.c
index 11d89fbaf..a5ae37ca3 100644
--- a/main/astobj2.c
+++ b/main/astobj2.c
@@ -508,7 +508,7 @@ static struct bucket_list *__ao2_link(struct ao2_container *c, void *user_data,
if (!p)
return NULL;
- i = c->hash_fn(user_data, OBJ_POINTER);
+ i = abs(c->hash_fn(user_data, OBJ_POINTER));
ao2_lock(c);
i %= c->n_buckets;