diff options
Diffstat (limited to 'upb/shim/shim.c')
-rw-r--r-- | upb/shim/shim.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/upb/shim/shim.c b/upb/shim/shim.c index 797a2d1..02da85d 100644 --- a/upb/shim/shim.c +++ b/upb/shim/shim.c @@ -37,8 +37,9 @@ bool upb_shim_set(upb_handlers *h, const upb_fielddef *f, size_t offset, d->hasbit = hasbit; upb_handlerattr attr = UPB_HANDLERATTR_INITIALIZER; - upb_handlerattr_sethandlerdata(&attr, d, free); + upb_handlerattr_sethandlerdata(&attr, d); upb_handlerattr_setalwaysok(&attr, true); + upb_handlers_addcleanup(h, d, free); #define TYPE(u, l) \ case UPB_TYPE_##u: \ |