diff options
author | Josh Haberman <jhaberman@gmail.com> | 2014-06-26 20:24:32 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2014-06-26 20:24:32 -0700 |
commit | 2d10fa33071d52d7a35ce3b13bc459cd16a0aa33 (patch) | |
tree | bf47d38e2e1cc8ddb4711b23b26e7fd10742e07d /upb/shim | |
parent | 7d565f1e7a0f107506d3cf31ef2e33e22a504d2b (diff) |
Sync from internal Google development.
Diffstat (limited to 'upb/shim')
-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: \ |