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

pull/3083/head
Paul Yang 8 years ago committed by GitHub
parent 22319315df
commit de6ae7d4eb
  1. 3
      php/ext/google/protobuf/upb.c

@ -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) {

Loading…
Cancel
Save