ViniciusSouzaRoque commented on code in PR #12716:
URL: https://github.com/apache/arrow/pull/12716#discussion_r848684055


##########
cpp/src/gandiva/precompiled/string_ops.cc:
##########
@@ -2815,14 +2815,17 @@ const char* soundex_utf8(gdv_int64 ctx, const char* in, 
gdv_int32 in_len,
   }
 
   // The soundex code is composed by one letter and three numbers
+  char* soundex = reinterpret_cast<char*>(gdv_fn_context_arena_malloc(ctx, 
in_len));
   char* ret = reinterpret_cast<char*>(gdv_fn_context_arena_malloc(ctx, 4));
-  if (ret == nullptr) {
+
+  if (soundex == nullptr || ret == nullptr) {

Review Comment:
   Yes, according to Projjal, this should return false



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to