From: Aki Tuomi Date: Tue, 6 Nov 2018 19:00:47 +0000 (+0200) Subject: lib-lua: Fix sizeof usage for struct event* storage X-Git-Tag: 2.3.9~1098 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e3d4f2bc263354213b40d67e40e253a0cb7bedbc;p=thirdparty%2Fdovecot%2Fcore.git lib-lua: Fix sizeof usage for struct event* storage Found by coverity --- diff --git a/src/lib-lua/dlua-dovecot.c b/src/lib-lua/dlua-dovecot.c index 7b29e96eff..2950489806 100644 --- a/src/lib-lua/dlua-dovecot.c +++ b/src/lib-lua/dlua-dovecot.c @@ -282,7 +282,7 @@ void dlua_push_event(struct dlua_script *script, struct event *event) luaL_setmetatable(script->L, DLUA_EVENT); /* we need to attach gc to userdata to support older lua*/ - struct event **ptr = lua_newuserdata(script->L, sizeof(struct event**)); + struct event **ptr = lua_newuserdata(script->L, sizeof(struct event*)); *ptr = event; lua_createtable(script->L, 0, 1); lua_pushcfunction(script->L, dlua_event_gc);