Commit de6ae7d4 authored by Paul Yang's avatar Paul Yang Committed by GitHub

Fix upb load descriptor when no messages defined in prorto. (#3080)

parent 22319315
......@@ -2290,6 +2290,9 @@ bool upb_symtab_addfile(upb_symtab *s, upb_filedef *file, upb_status *status) {
bool ret;
n = upb_filedef_defcount(file);
if (n == 0) {
return true;
}
defs = upb_gmalloc(sizeof(*defs) * n);
if (defs == NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment