Update src/redis-benchmark.c
Update src/redis-benchmark.c

The code of current implementation:

if (c->pending == 0) clientDone(c);
In clientDone function, the c's memory has been freed, then the loop will continue: while(c->pending). The memory of c has been freed now, so c->pending is invalid (c is an invalid pointer now), and this will cause memory dump in some platforams(eg: Solaris).

So I think the code should be modified as:
if (c->pending == 0)
{
clientDone(c);
break;
}
and this will not lead to while(c->pending).

ScottKaiGu/redis,miminus/redis,kts12345/redis,shanegxxiao/redis,daogangtang/redis_luajit2.6,laurencee/redis,Jonavin/redis,nandhanurrevanth/redis,ideaar/redis,StartTheShift/redis-shift,quangnguyen90/redis,hanmichael/redis,daogangtang/redis_luajit2.6,jacklee0810/redis,alpha8/redis,enginekit/redis,jaambee/redis,janeasystems/redis,adamweixuan/redis,crask/redis-cutter,kts12345/redis,laurencee/redis,upsoft/redis,richmonkey/netleveldb,jqk6/redis,powerumc/MyRedis_old,ideaar/redis,quangnguyen90/redis,sidsen/redis,jacklee0810/redis,hanmichael/redis,erwin00776/redis-2.8-optimize,powerumc/MyRedis,liqiang199105/redis,kolonse/redis,adamweixuan/redis,damy/redis,powerumc/MyRedis,StartTheShift/redis-shift,jqk6/redis,alpha8/redis,powerumc/MyRedis,jqk6/redis,quangnguyen90/redis,kolonse/redis,kts12345/redis,fanxu/redis,jaambee/redis,nandhanurrevanth/redis,Jonavin/redis,grisha/thredis,sidsen/redis,oaastest/redis,StartTheShift/redis-shift,Cybermaxs/redis,liqiang199105/redis,shanegxxiao/redis,daogangtang/redis_luajit2.6,enginekit/redis,laurencee/redis,sidsen/redis,jaambee/redis,miminus/redis,nandhanurrevanth/redis,enginekit/redis,jqk6/redis,laurencee/redis,kts12345/redis,adamweixuan/redis,crask/redis-cutter,Cybermaxs/redis,fanxu/redis,janeasystems/redis,powerumc/MyRedis_old,damy/redis,upsoft/redis,daogangtang/redis_luajit2.6,liqiang199105/redis,richmonkey/netleveldb,jaambee/redis,jacklee0810/redis,janeasystems/redis,DeNA/redis,hanmichael/redis,Cybermaxs/redis,shanegxxiao/redis,powerumc/MyRedis_old,grisha/thredis,ScottKaiGu/redis,ideaar/redis,enginekit/redis,erwin00776/redis-2.8-optimize,crask/redis-cutter,ScottKaiGu/redis,enginekit/redis,alpha8/redis,grisha/thredis,miminus/redis,jqk6/redis,kts12345/redis,liqiang199105/redis,shanegxxiao/redis,adamweixuan/redis,DeNA/redis,richmonkey/netleveldb,ScottKaiGu/redis,DeNA/redis,upsoft/redis,LittlePeng/redis,erwin00776/redis-2.8-optimize,jacklee0810/redis,janeasystems/redis,quangnguyen90/redis,upsoft/redis,kolonse/redis,oaastest/redis,adamweixuan/redis,ideaar/redis,Jonavin/redis,miminus/redis,laurencee/redis,fanxu/redis,oaastest/redis,erwin00776/redis-2.8-optimize,alpha8/redis,sidsen/redis,jaambee/redis,ideaar/redis,upsoft/redis,janeasystems/redis,kolonse/redis,Cybermaxs/redis,nandhanurrevanth/redis,Cybermaxs/redis,grisha/thredis,quangnguyen90/redis,LittlePeng/redis,alpha8/redis,liqiang199105/redis,ScottKaiGu/redis,damy/redis,nandhanurrevanth/redis,Jonavin/redis,oaastest/redis,LittlePeng/redis,miminus/redis,richmonkey/netleveldb,jacklee0810/redis,powerumc/MyRedis_old,shanegxxiao/redis,hanmichael/redis,sidsen/redis,oaastest/redis,hanmichael/redis,Jonavin/redis,damy/redis,fanxu/redis,sidsen/redis,kolonse/redis,damy/redis