Check whether the client is NULL in luaCreateFunction (#12829)
It was first added to load lua from RDB, see 28dfdca7. After #9812, we no longer save lua in RDB. luaCreateFunction will only be called in script load and eval*, both of which are available in the client. It could be that that some day we'll still want to load scripts from somewhere that's not a client. This fix is in dead code.
This commit is contained in:
parent
8a4ccb01b3
commit
764838d66f
@ -436,7 +436,9 @@ sds luaCreateFunction(client *c, robj *body) {
|
||||
ssize_t shebang_len = 0;
|
||||
sds err = NULL;
|
||||
if (evalExtractShebangFlags(body->ptr, &script_flags, &shebang_len, &err) == C_ERR) {
|
||||
addReplyErrorSds(c, err);
|
||||
if (c != NULL) {
|
||||
addReplyErrorSds(c, err);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user