if(!l)
return 0;
- ln = (lua_localnick *)malloc(sizeof(lua_localnick));
+ ln = (lua_localnick *)luamalloc(sizeof(lua_localnick));
if(!ln)
return 0;
ln->nick = registerlocaluser(nickname, ident, hostname, realname, account, modes, &lua_localnickhandler);
if(!ln->nick) {
- free(ln);
+ luafree(ln);
return 0;
}
luaL_unref(ps, LUA_REGISTRYINDEX, l->handler);
- free(l);
+ luafree(l);
}
int lua_getlocalnickbynick(nick *np, lua_list **rl, lua_localnick **rln) {
static int lua_localovmode(lua_State *l) {
nick *source;
channel *chan;
- int state = 0, add, realmode, ignoring = 0;
+ int state = 0, add = 0, realmode = 0, ignoring = 0;
modechanges changes;
if(!lua_islong(l, 1) || !lua_isstring(l, 2) || !lua_istable(l, 3))