summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2018-10-03 21:09:15 +0530
committerAmar Tumballi <amarts@redhat.com>2018-10-05 00:08:59 +0000
commita6128d64ec4c25eba002941ae68a9e9a72805704 (patch)
tree4e11b05ab574535d7c9954be853d2eb41d024f82 /libglusterfs
parent4f7729748ee7d79e41dec9682a4fbbb2378ed5ac (diff)
libglusterfs: coverity fix
CID: 1395829 Issue: Uninitialized pointer read Change-Id: I2e03d7b2a2f28f4a46408402ae03beba0f4c8308 Updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/monitoring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/monitoring.c b/libglusterfs/src/monitoring.c
index 316875257cc..245f1baf799 100644
--- a/libglusterfs/src/monitoring.c
+++ b/libglusterfs/src/monitoring.c
@@ -228,7 +228,7 @@ gf_monitor_metrics(glusterfs_ctx_t *ctx)
{
int ret = -1;
int fd = 0;
- char *filepath, *dumppath;
+ char *filepath = NULL, *dumppath = NULL;
dumppath = ctx->config.metrics_dumppath;
if (dumppath == NULL) {
@@ -238,7 +238,7 @@ gf_monitor_metrics(glusterfs_ctx_t *ctx)
if (ret) {
/* EEXIST is handled in mkdir_p() itself */
gf_msg("monitoring", GF_LOG_ERROR, 0, LG_MSG_STRDUP_ERROR,
- "failed to create metrics dir %s (%s)", filepath,
+ "failed to create metrics dir %s (%s)", dumppath,
strerror(errno));
return NULL;
}