summaryrefslogtreecommitdiff
path: root/upb/shim
diff options
context:
space:
mode:
Diffstat (limited to 'upb/shim')
-rw-r--r--upb/shim/shim.c3
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: \
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback