From 7e691da0d37745e12d2f3e132545db82f05ea8f6 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 16 Nov 2018 11:18:27 +0530 Subject: 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 --- xlators/features/changelog/src/changelog-rpc-common.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'xlators/features/changelog') diff --git a/xlators/features/changelog/src/changelog-rpc-common.c b/xlators/features/changelog/src/changelog-rpc-common.c index ce01bf7a133..91d6581836a 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; } -- cgit