mirror of https://github.com/redis/redis.git
				
				
				
			Replace wrongly free with zfree in redis-cli (#13560)
#13258 Incorrect use of free instead of zfree
This commit is contained in:
		
							parent
							
								
									3a3cacfefa
								
							
						
					
					
						commit
						438cfed70a
					
				| 
						 | 
					@ -3695,7 +3695,7 @@ static int evalMode(int argc, char **argv) {
 | 
				
			||||||
        int eval_ldb = config.eval_ldb; /* Save it, may be reverted. */
 | 
					        int eval_ldb = config.eval_ldb; /* Save it, may be reverted. */
 | 
				
			||||||
        retval = issueCommand(argc+3-got_comma, argv2);
 | 
					        retval = issueCommand(argc+3-got_comma, argv2);
 | 
				
			||||||
        for (j = 0; j < argc+3-got_comma; j++) sdsfree(argv2[j]);
 | 
					        for (j = 0; j < argc+3-got_comma; j++) sdsfree(argv2[j]);
 | 
				
			||||||
        free(argv2);
 | 
					        zfree(argv2);
 | 
				
			||||||
        if (eval_ldb) {
 | 
					        if (eval_ldb) {
 | 
				
			||||||
            if (!config.eval_ldb) {
 | 
					            if (!config.eval_ldb) {
 | 
				
			||||||
                /* If the debugging session ended immediately, there was an
 | 
					                /* If the debugging session ended immediately, there was an
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -808,6 +808,12 @@ if {!$::tls} { ;# fake_redis_node doesn't support TLS
 | 
				
			||||||
        assert_equal 3 [exec {*}$cmdline ZCARD new_zset]
 | 
					        assert_equal 3 [exec {*}$cmdline ZCARD new_zset]
 | 
				
			||||||
        assert_equal "a\n1\nb\n2\nc\n3" [exec {*}$cmdline ZRANGE new_zset 0 -1 WITHSCORES]
 | 
					        assert_equal "a\n1\nb\n2\nc\n3" [exec {*}$cmdline ZRANGE new_zset 0 -1 WITHSCORES]
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    test "Send eval command by using --eval option" {
 | 
				
			||||||
 | 
					        set tmpfile [write_tmpfile {return ARGV[1]}]
 | 
				
			||||||
 | 
					        set cmdline [rediscli [srv host] [srv port]]
 | 
				
			||||||
 | 
					        assert_equal "foo" [exec {*}$cmdline --eval $tmpfile , foo]
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
start_server {tags {"cli external:skip"}} {
 | 
					start_server {tags {"cli external:skip"}} {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue