diff options
Diffstat (limited to 'php/ext/google/protobuf/upb.c')
-rw-r--r-- | php/ext/google/protobuf/upb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/php/ext/google/protobuf/upb.c b/php/ext/google/protobuf/upb.c index cac2b401..d701dcba 100644 --- a/php/ext/google/protobuf/upb.c +++ b/php/ext/google/protobuf/upb.c @@ -2308,6 +2308,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) { |