diff options
author | Paul Yang <TeBoring@users.noreply.github.com> | 2018-05-29 10:25:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-29 10:25:05 -0700 |
commit | 7d1a8fff1b424e63f6bbdd1f9f828f6f9f40e84f (patch) | |
tree | 8090ac6eb78988d1dc85543db23dd5af486ca5f5 /php/ext/google | |
parent | 2804902446bf6f3d7d2a58fad7a053034dfcda84 (diff) |
Fix php memory leak test (#4692)
Diffstat (limited to 'php/ext/google')
-rw-r--r-- | php/ext/google/protobuf/def.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/php/ext/google/protobuf/def.c b/php/ext/google/protobuf/def.c index cb2c7201..fa33830b 100644 --- a/php/ext/google/protobuf/def.c +++ b/php/ext/google/protobuf/def.c @@ -773,6 +773,7 @@ static size_t classname_len_max(const char *fullname, static bool is_reserved(const char *segment, int length) { bool result; char* lower = ALLOC_N(char, length + 1); + memset(lower, 0, length + 1); memcpy(lower, segment, length); int i = 0; while(lower[i]) { |