mirror of
http://github.com/valkey-io/valkey
synced 2024-11-21 16:46:15 +00:00
Remove unused var desc in luaRegisterFunctionReadPositionalArgs (#130)
desc is set to NULL, never set to anything, and then checked if it should be freed on the error path if it's NULL. This can be cleaned up, since it's really unused. Fixes #129 Signed-off-by: 0del <bany.y0599@gmail.com>
This commit is contained in:
parent
0ba2f1b14e
commit
4d7fff9aba
@ -354,7 +354,6 @@ error:
|
||||
static int luaRegisterFunctionReadPositionalArgs(lua_State *lua, registerFunctionArgs *register_f_args) {
|
||||
char *err = NULL;
|
||||
sds name = NULL;
|
||||
sds desc = NULL;
|
||||
luaFunctionCtx *lua_f_ctx = NULL;
|
||||
if (!(name = luaGetStringSds(lua, 1))) {
|
||||
err = "first argument to redis.register_function must be a string";
|
||||
@ -377,7 +376,6 @@ static int luaRegisterFunctionReadPositionalArgs(lua_State *lua, registerFunctio
|
||||
|
||||
error:
|
||||
if (name) sdsfree(name);
|
||||
if (desc) sdsfree(desc);
|
||||
luaPushError(lua, err);
|
||||
return C_ERR;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user