diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-05-28 14:04:04 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-05-28 14:04:05 +0000 |
commit | ba01a54f212e98a13083867431dbb54160b496c6 (patch) | |
tree | 9d8697fb7897dcff5620ff85f574c816caa9000d /hicn-plugin/src/cache_policies/cs_lru.c | |
parent | cb549cad953a0578f6908382a90e4eb01b2b26a6 (diff) | |
parent | 2e1756de877df622680b05be421cb27a884db167 (diff) |
Merge "[HICN-197] Supporting multiple local faces for the same prefix. Fixed buffer deallocation when data are pushed from the application."
Diffstat (limited to 'hicn-plugin/src/cache_policies/cs_lru.c')
-rw-r--r-- | hicn-plugin/src/cache_policies/cs_lru.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hicn-plugin/src/cache_policies/cs_lru.c b/hicn-plugin/src/cache_policies/cs_lru.c index f35bee3c9..1f1d14667 100644 --- a/hicn-plugin/src/cache_policies/cs_lru.c +++ b/hicn-plugin/src/cache_policies/cs_lru.c @@ -149,6 +149,12 @@ hicn_cs_lru_update_head (hicn_pit_cs_t * pit, hicn_hash_node_t * pnode, } else { + /* The element is already dequeue */ + if (pcs->u.cs.cs_lru_next == 0) + { + /* Now detached from the list; attach at head */ + hicn_cs_lru_insert (pit, pnode, pcs, lru); + } ASSERT (lru->head == hicn_hashtb_node_idx_from_node (pit->pcs_table, pnode)); } |