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
  • Loading branch information
miconda committed Oct 31, 2016
1 parent 49dd331 commit c568160
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ndb_redis/redis_client.c
Expand Up @@ -364,7 +364,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 @@ -375,6 +374,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 c568160

Please sign in to comment.