Skip to content

Commit

Permalink
ndb_redis: get the srv structure after checking parameter sanity
Browse files Browse the repository at this point in the history
(cherry picked from commit c568160)
  • Loading branch information
miconda committed Nov 2, 2016
1 parent b381679 commit 5bb0359
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ndb_redis/redis_client.c
Expand Up @@ -348,7 +348,6 @@ int redisc_exec(str *srv, str *res, str *cmd, ...)
va_start(ap, cmd);
va_copy(ap2, ap);

rsrv = redisc_get_server(srv);
if(srv==NULL || cmd==NULL || res==NULL)
{
LM_ERR("invalid parameters");
Expand All @@ -359,6 +358,7 @@ int redisc_exec(str *srv, str *res, str *cmd, ...)
LM_ERR("invalid parameters");
goto error_exec;
}
rsrv = redisc_get_server(srv);
if(rsrv==NULL)
{
LM_ERR("no redis server found: %.*s\n", srv->len, srv->s);
Expand Down

0 comments on commit 5bb0359

Please sign in to comment.