diff options
author | rishubhjain <rishubhjain47@gmail.com> | 2019-03-30 15:46:38 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2019-04-08 07:55:57 +0000 |
commit | 4f6749aa308152dc6350632991a6ae11b8467fb1 (patch) | |
tree | 356c9712e01be7e7afa9e9a19f877fe09110808b /xlators | |
parent | 66b32363b203a21c41fa4988b55ca91f99d07d6b (diff) | |
download | glusterfs-4f6749aa308152dc6350632991a6ae11b8467fb1.tar.gz glusterfs-4f6749aa308152dc6350632991a6ae11b8467fb1.tar.xz glusterfs-4f6749aa308152dc6350632991a6ae11b8467fb1.zip |
GlusterD: Resolves the issue of referencing memory after it has been freed
Setting the pointer to NULL after GF_FREE() and checking the pointer value
before calling GF_FREE() to avoid referencing memory after its has been freed
CID: 1398622
Change-Id: Iba0d8879abccf5923a69132a207d53bb94551417
updates: bz#789278
Signed-off-by: rishubhjain <rishubhjain47@gmail.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 3570b018ee..565f8b7dc3 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -13173,8 +13173,6 @@ glusterd_get_default_val_for_volopt(dict_t *ctx, gf_boolean_t all_opts, "Failed to " "set %s in dictionary", vme->key); - if (get_value_vme) - GF_FREE(def_val); goto out; } sprintf(dict_key, "value%d", count); @@ -13184,8 +13182,6 @@ glusterd_get_default_val_for_volopt(dict_t *ctx, gf_boolean_t all_opts, "Failed to " "set %s for key %s in dictionary", def_val, vme->key); - if (get_value_vme) - GF_FREE(def_val); goto out; } if (get_value_vme) |