commit d58ae33e5c1607c42d9abf7aa56e0a4d14a3ac6a
parent 95574e45386c066adbd46cb0890df05ab30376a3
Author: James Prestwood <prestwoj@gmail.com>
Date: Tue, 3 Aug 2021 14:40:45 -0700
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.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/erp.c b/src/erp.c
@@ -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;
}