liweitianux commented on issue #8931: URL: https://github.com/apache/apisix/issues/8931#issuecomment-1664883570
> And I believe [lua-resty-nanoid](https://github.com/aikin-vip/lua-resty-nanoid) also has a memory leak issue. The ID [buffer was allocated by malloc()](https://github.com/aikin-vip/lua-resty-nanoid/blob/master/src/nanoid.h#L70) but was [never freed](https://github.com/aikin-vip/lua-resty-nanoid/blob/master/src/nanoid.c#L29-L31). It should be freed by the caller, i.e., the Lua C interface. Furthermore, that code doesn't NUL-terminate the C string, so I sometimes saw garbled code in the generated IDs... It's quite messy. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org