hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Memory Leak?

Open QiAnXinCodeSafe opened this issue 1 year ago • 0 comments

Hi all, This is Qianxin CodeSafe Team, we found a suspicious issue, at https://github.com/facebook/hhvm/blob/a3a83d96bb0cad09138a746c65ba0d5d84f77bf7/hphp/runtime/base/preg.cpp#L659 subpat_names is the memory allocated by calloc,at https://github.com/facebook/hhvm/blob/a3a83d96bb0cad09138a746c65ba0d5d84f77bf7/hphp/runtime/base/preg.cpp#L655 but we don't see the code to free this memory. If you do not call free(subpat_names) after using subpat_names, you will indeed cause a memory leak.

QiAnXinCodeSafe avatar Oct 08 '24 10:10 QiAnXinCodeSafe