aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_hash
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_hash')
-rw-r--r--lib/librte_hash/rte_cuckoo_hash.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index 55fd7bdc..cbf78fab 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -573,7 +573,8 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
* Return index where key is stored,
* subtracting the first dummy index
*/
- return prim_bkt->key_idx[i] - 1;
+ ret = prim_bkt->key_idx[i] - 1;
+ goto failure;
}
}
}
@@ -593,7 +594,8 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
* Return index where key is stored,
* subtracting the first dummy index
*/
- return sec_bkt->key_idx[i] - 1;
+ ret = sec_bkt->key_idx[i] - 1;
+ goto failure;
}
}
}