Initialize path, since coverty detect a code path where

we do a free on a unitialized pointer
(if jbr_get_changelog_dir fail).

Change-Id: Ib68122bb9eddaeb422028f834856a0776ecbb789
BUG: 1424791
Signed-off-by: Michael Scherer <misc@redhat.com>
Reviewed-on: https://review.gluster.org/16670
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Tested-by: Nigel Babu <nigelb@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
This commit is contained in:
Michael Scherer 2017-02-19 14:51:27 +01:00 committed by Shyamsundar Ranganathan
parent 4a1740d3e8
commit 6b42f96d14

View File

@ -1179,7 +1179,7 @@ jbr_open_term (call_frame_t *frame, xlator_t *this, dict_t *xdata)
int32_t op_errno;
char *cl_dir;
char *term;
char *path;
char *path = NULL;
jbr_private_t *priv = this->private;
op_errno = jbr_get_changelog_dir(this, &cl_dir);