erp: take cache ref in erp_new

Since the erp_state is holding a pointer to the ERP cache, as
well as calling erp_cache_put on free, it should take a reference
for symmetry.
This commit is contained in:
James Prestwood 2021-08-03 14:40:45 -07:00 committed by Denis Kenzior
parent 95574e4538
commit d58ae33e5c
1 changed files with 1 additions and 0 deletions

View File

@ -336,6 +336,7 @@ struct erp_state *erp_new(struct erp_cache_entry *cache,
erp->tx_packet = tx_packet;
erp->user_data = user_data;
erp->cache = cache;
cache->ref++;
return erp;
}