BUG/MINOR: hlua: fix invalid errmsg use in hlua_init()

errmsg is used with memprintf and friends, thus it must be NULL
initialized before being passed to memprintf, else invalid read will
occur.

However in hlua_init() the errmsg value isn't initialized, let's fix that

This is really minor because it would only cause issue on error paths,
yet it may be backported to all stable versions, just in case.
This commit is contained in:
Aurelien DARRAGON 2025-04-10 17:35:53 +02:00
parent 7b6df86a83
commit ea3c96369f

View File

@ -14459,7 +14459,7 @@ lua_State *hlua_init_state(int thread_num)
void hlua_init(void) {
int i;
char *errmsg;
char *errmsg = NULL;
#ifdef USE_OPENSSL
struct srv_kw *kw;
int tmp_error;