From 0402a13914084219db3a6f6867117b8757112b24 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 8 Oct 2018 19:22:53 +0530 Subject: glusterfsd: fix the asan leak message Fixes below trace of ASan: Direct leak of 130 byte(s) in 1 object(s) allocated from: #0 0x7fa794bb5850 in malloc (/lib64/libasan.so.4+0xde850) #1 0x7fa7944e5de9 in __gf_malloc ../../../libglusterfs/src/mem-pool.c:136 #2 0x40b85c in gf_strndup ../../../libglusterfs/src/mem-pool.h:166 #3 0x40b85c in gf_strdup ../../../libglusterfs/src/mem-pool.h:183 #4 0x40b85c in parse_opts ../../../glusterfsd/src/glusterfsd.c:1049 #5 0x7fa792a98720 in argp_parse (/lib64/libc.so.6+0x101720) #6 0x40d89f in parse_cmdline ../../../glusterfsd/src/glusterfsd.c:2041 #7 0x406d07 in main ../../../glusterfsd/src/glusterfsd.c:2625 updates: bz#1633930 Change-Id: I394b3fc24b7a994c1b03635cb5e973e7290491d3 Signed-off-by: Amar Tumballi --- glusterfsd/src/glusterfsd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'glusterfsd/src') diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 6e61a66c6d1..dfef7922245 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -2206,6 +2206,7 @@ glusterfs_pidfile_cleanup(glusterfs_ctx_t *ctx) gf_msg_trace("glusterfsd", 0, "pidfile %s cleanup", cmd_args->pid_file); if (ctx->cmd_args.pid_file) { + GF_FREE(ctx->cmd_args.pid_file); ctx->cmd_args.pid_file = NULL; } -- cgit