X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_hash%2Frte_fbk_hash.c;h=55c9f358319c01adf544cce3d8b6b9280128fe49;hb=af35e12191f5817c38b37b0ea1142bcd19e30c74;hp=356ddfe67a16ff76adcf0e452a2b4f1ee034bb6c;hpb=a2348166ea186506d45b61d5073d16ad974e79bb;p=dpdk.git diff --git a/lib/librte_hash/rte_fbk_hash.c b/lib/librte_hash/rte_fbk_hash.c index 356ddfe67a..55c9f35831 100644 --- a/lib/librte_hash/rte_fbk_hash.c +++ b/lib/librte_hash/rte_fbk_hash.c @@ -140,8 +140,11 @@ rte_fbk_hash_create(const struct rte_fbk_hash_params *params) if (strncmp(params->name, ht->name, RTE_FBK_HASH_NAMESIZE) == 0) break; } - if (te != NULL) + ht = NULL; + if (te != NULL) { + rte_errno = EEXIST; goto exit; + } te = rte_zmalloc("FBK_HASH_TAILQ_ENTRY", sizeof(*te), 0); if (te == NULL) { @@ -226,4 +229,3 @@ rte_fbk_hash_free(struct rte_fbk_hash_table *ht) rte_free(ht); rte_free(te); } -