Fix customData free

This commit is contained in:
Mathieu Maret 2024-02-10 22:49:24 +01:00
parent 88b9c3160b
commit 3339f8b059
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,9 @@ static int zeroClose(struct uAddrVirtualReg *vreg)
{
struct zeroMappedEntry *ent = (struct zeroMappedEntry *)vreg->res->customData;
ent->refCnt--;
if (ent->refCnt == 0) {
free(vreg->res->customData);
}
return 0;
}