mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
fixed a minor memory leak in configuration file parsing
This commit is contained in:
parent
2316bb3b42
commit
fefed59798
1
redis.c
1
redis.c
@ -1633,6 +1633,7 @@ static void loadServerConfig(char *filename) {
|
||||
err = "argument must be 'yes' or 'no'"; goto loaderr;
|
||||
}
|
||||
} else if (!strcasecmp(argv[0],"vm-swap-file") && argc == 2) {
|
||||
zfree(server.vm_swap_file);
|
||||
server.vm_swap_file = zstrdup(argv[1]);
|
||||
} else if (!strcasecmp(argv[0],"vm-max-memory") && argc == 2) {
|
||||
server.vm_max_memory = strtoll(argv[1], NULL, 10);
|
||||
|
@ -317,9 +317,9 @@ proc main {server port} {
|
||||
set _ $err
|
||||
} {}
|
||||
|
||||
test {DBSIZE should be 10001 now} {
|
||||
test {DBSIZE should be 10101 now} {
|
||||
$r dbsize
|
||||
} {10001}
|
||||
} {10101}
|
||||
|
||||
test {INCR against non existing key} {
|
||||
set res {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user