summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-parser.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-01-06 14:30:08 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-07-25 23:47:33 -0700
commitd2bd17e5a53d0ffa375df1a5ad957556be2f2b83 (patch)
tree872633e25252817ee332d0b64a92cd64eba7464b /cli/src/cli-cmd-parser.c
parent558a45fa527b01ec81904150532a8b661c06ae8a (diff)
dict: Don't expose get_new_dict/dict_destroy
get_new_dict/dict_destroy is causing confusion where, dict_new/dict_destroy or get_new_dict/dict_unref are used instead of dict_new/dict_unref. Change-Id: I4cc69f5b6711d720823395e20fd624a0c6c1168c BUG: 1296043 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13183 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r--cli/src/cli-cmd-parser.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 77092b47591..f696ab45c55 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -740,7 +740,7 @@ out:
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Unable to parse create volume CLI");
if (dict)
- dict_destroy (dict);
+ dict_unref (dict);
}
GF_FREE (trans_type);
@@ -816,7 +816,7 @@ cli_cmd_volume_reset_parse (const char **words, int wordcount, dict_t **options)
out:
if (ret && dict) {
- dict_destroy (dict);
+ dict_unref (dict);
}
return ret;
@@ -978,7 +978,7 @@ cli_cmd_inode_quota_parse (const char **words, int wordcount, dict_t **options)
out:
if (ret < 0) {
if (dict)
- dict_destroy (dict);
+ dict_unref (dict);
}
return ret;
@@ -1317,7 +1317,7 @@ set_type:
out:
if (ret < 0) {
if (dict)
- dict_destroy (dict);
+ dict_unref (dict);
}
return ret;
@@ -1570,8 +1570,8 @@ cli_cmd_volume_set_parse (struct cli_state *state, const char **words,
*options = dict;
out:
- if (ret)
- dict_destroy (dict);
+ if (ret && dict)
+ dict_unref (dict);
return ret;
}
@@ -1711,7 +1711,7 @@ out:
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Unable to parse add-brick CLI");
if (dict)
- dict_destroy (dict);
+ dict_unref (dict);
}
return ret;
@@ -1790,7 +1790,7 @@ out:
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Unable to parse tier CLI");
if (dict)
- dict_destroy (dict);
+ dict_unref (dict);
}
return ret;
@@ -2019,7 +2019,7 @@ out:
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Unable to parse remove-brick CLI");
if (dict)
- dict_destroy (dict);
+ dict_unref (dict);
}
GF_FREE (tmp_brick);
@@ -2112,7 +2112,7 @@ out:
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Unable to parse replace-brick CLI");
if (dict)
- dict_destroy (dict);
+ dict_unref (dict);
}
return ret;
@@ -2173,7 +2173,7 @@ cli_cmd_log_filename_parse (const char **words, int wordcount, dict_t **options)
out:
if (ret && dict)
- dict_destroy (dict);
+ dict_unref (dict);
return ret;
}
@@ -2230,7 +2230,7 @@ cli_cmd_log_level_parse (const char **words, int worcount, dict_t **options)
out:
if (ret && dict)
- dict_destroy (dict);
+ dict_unref (dict);
return ret;
}
@@ -2281,7 +2281,7 @@ cli_cmd_log_locate_parse (const char **words, int wordcount, dict_t **options)
out:
if (ret && dict)
- dict_destroy (dict);
+ dict_unref (dict);
return ret;
}
@@ -2335,7 +2335,7 @@ cli_cmd_log_rotate_parse (const char **words, int wordcount, dict_t **options)
out:
if (ret && dict)
- dict_destroy (dict);
+ dict_unref (dict);
return ret;
}
@@ -2757,7 +2757,7 @@ out:
GF_FREE (slave_temp);
if (ret) {
if (dict)
- dict_destroy (dict);
+ dict_unref (dict);
} else
*options = dict;
@@ -2854,7 +2854,7 @@ cli_cmd_volume_profile_parse (const char **words, int wordcount,
*options = dict;
out:
if (ret && dict)
- dict_destroy (dict);
+ dict_unref (dict);
return ret;
}
@@ -3043,7 +3043,7 @@ cli_cmd_volume_top_parse (const char **words, int wordcount,
*options = dict;
out:
if (ret && dict)
- dict_destroy (dict);
+ dict_unref (dict);
return ret;
}
@@ -3256,7 +3256,7 @@ cli_cmd_volume_status_parse (const char **words, int wordcount,
out:
if (ret && dict)
- dict_destroy (dict);
+ dict_unref (dict);
return ret;
}
@@ -3318,7 +3318,7 @@ cli_cmd_volume_statedump_options_parse (const char **words, int wordcount,
*options = dict;
out:
if (ret && dict)
- dict_destroy (dict);
+ dict_unref (dict);
if (ret)
gf_log ("cli", GF_LOG_ERROR, "Error parsing dumpoptions");
return ret;
@@ -3794,7 +3794,7 @@ done:
out:
if (ret && dict)
- dict_destroy (dict);
+ dict_unref (dict);
return ret;
}
@@ -5118,7 +5118,7 @@ cli_cmd_snapshot_parse (const char **words, int wordcount, dict_t **options,
out:
if (ret) {
if (dict)
- dict_destroy (dict);
+ dict_unref (dict);
} else
*options = dict;
@@ -5373,7 +5373,7 @@ out:
if (ret) {
gf_log ("cli", GF_LOG_ERROR, "Unable to parse bitrot command");
if (dict)
- dict_destroy (dict);
+ dict_unref (dict);
}
return ret;