We were stupidly always hashing entry->ino where entry was just freshly
allocated zeroed-memory so we effectively added stuff to the cache
forever but this meant:
- we never found a match when we hashed the actual inode
- we kept growing the cache
- we leaked memory
Closes: #407.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
if (!entry)
return;
- ino_hash = HASH(entry->ino);
+ ino_hash = HASH(pidns_inode);
*entry = (struct pidns_init_store){
.ino = pidns_inode,
.initpid = pid,