From c8fa2f11685049acfba5b831cbf80e040eb3b5a9 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 2 Jun 2022 08:55:17 -0700 Subject: [PATCH] free lower --- php/ext/google/protobuf/names.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/php/ext/google/protobuf/names.c b/php/ext/google/protobuf/names.c index 212aded35b..87ac40de76 100644 --- a/php/ext/google/protobuf/names.c +++ b/php/ext/google/protobuf/names.c @@ -285,8 +285,10 @@ bool IsPreviouslyUnreservedClassName(const char* fullname) { int j; for (j = 0; kPreviouslyUnreservedNames[j]; j++) { if (strcmp(kPreviouslyUnreservedNames[j], lower) == 0) { + free(lower); return true; } } + free(lower); return false; }