summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2018-11-16 11:18:27 +0530
committerAmar Tumballi <amarts@redhat.com>2018-11-23 06:57:06 +0000
commit7e691da0d37745e12d2f3e132545db82f05ea8f6 (patch)
treed3e2a40731c6cac5370676d9ba806c49fbca694f
parentc0983c3532e2da04c8c8f63df2717c154e0724db (diff)
downloadglusterfs-7e691da0d37745e12d2f3e132545db82f05ea8f6.tar.gz
glusterfs-7e691da0d37745e12d2f3e132545db82f05ea8f6.tar.xz
glusterfs-7e691da0d37745e12d2f3e132545db82f05ea8f6.zip
features/changelog: Fix dictionary-leak
rpcsvc_transport_unix_options_build() allocates the dictionary and sets it in the options variable, there is no need to allocate it before passing to the function in changelog_rpc_server_init() updates bz#1650403 Change-Id: I5b4caedba6bda706dee723a2be34c3981bf971fb Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
-rw-r--r--xlators/features/changelog/src/changelog-rpc-common.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/xlators/features/changelog/src/changelog-rpc-common.c b/xlators/features/changelog/src/changelog-rpc-common.c
index ce01bf7a13..91d6581836 100644
--- a/xlators/features/changelog/src/changelog-rpc-common.c
+++ b/xlators/features/changelog/src/changelog-rpc-common.c
@@ -299,10 +299,6 @@ changelog_rpc_server_init(xlator_t *this, char *sockfile, void *cbkdata,
if (!cbkdata)
cbkdata = this;
- options = dict_new();
- if (!options)
- goto error_return;
-
ret = rpcsvc_transport_unix_options_build(&options, sockfile);
if (ret)
goto dealloc_dict;
@@ -350,6 +346,5 @@ dealloc_rpc:
GF_FREE(rpc);
dealloc_dict:
dict_unref(options);
-error_return:
return NULL;
}