diff options
author | shishir gowda <shishirng@gluster.com> | 2011-04-01 03:24:12 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-04-01 06:08:33 -0700 |
commit | cd4fd271c6636ecc100171403b324a65a9e77fe2 (patch) | |
tree | c86febf72ba00dd56600f3e8ba836aaa96ae83bc /cli | |
parent | 5c709704ab5767b55f4eef7cddea52e18e2a6d42 (diff) |
Replace strdup call to gf_strdup as GF_FREE is being called
Also, fix validation of bs and count to <= 0.
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 2645 (volume top write-perf results in memory corruption)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2645
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-cmd-parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 799a64bb9..300091d97 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1343,7 +1343,7 @@ cli_cmd_volume_top_parse (const char **words, int wordcount, ret = gf_is_str_int (value); if (!ret) blk_size = atoi (value); - if (ret || (blk_size < 0)) { + if (ret || (blk_size <= 0)) { cli_out ("block size should be an integer " "greater than zero"); ret = -1; @@ -1354,7 +1354,7 @@ cli_cmd_volume_top_parse (const char **words, int wordcount, ret = gf_is_str_int (value); if (!ret) count = atoi(value); - if (ret || (count < 0)) { + if (ret || (count <= 0)) { cli_out ("count should be an integer greater " "zero"); ret = -1; |