diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2011-07-29 17:49:59 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2011-07-29 17:49:59 -0700 |
commit | 56984e8db8e1c43687535cc77fb6ce43df0b3d1f (patch) | |
tree | dc8c85d1311458a68408ff4c43d009b6193ac221 /upb/descriptor.c | |
parent | 92b4c38fa5f137cbcf835ad359bed8711c1c9c51 (diff) |
Significant work on Lua extension.
Also changes in core library to accommodate.
Diffstat (limited to 'upb/descriptor.c')
-rw-r--r-- | upb/descriptor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/upb/descriptor.c b/upb/descriptor.c index 568a0d2..fbaef29 100644 --- a/upb/descriptor.c +++ b/upb/descriptor.c @@ -367,11 +367,13 @@ static void upb_fielddef_endmsg(void *_r, upb_status *status) { upb_fielddef *f = r->f; // TODO: verify that all required fields were present. assert(f->number != -1 && f->name != NULL); - assert((f->def != NULL) == upb_hasdef(f)); + assert((f->def != NULL) == upb_hassubdef(f)); // Field was successfully read, add it as a field of the msgdef. upb_msgdef *m = upb_descreader_top(r); upb_msgdef_addfield(m, f); + upb_fielddef_unref(f); + r->f = NULL; char *dstr = r->default_string; r->default_string = NULL; upb_value val; |