summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Ellenberg <lars@linbit.com>2013-03-02 00:59:15 +0100
committerVijay Bellur <vbellur@redhat.com>2013-03-08 09:17:51 -0800
commit8500c9aff1d46a4cb129cdecac48ee369e46bebf (patch)
tree051922e50a619c315022622220edcaee89ec6a59 /tests
parent140e9756a569efd02ea970cb484d6f1a7c3da688 (diff)
glusterd: fix segfault on volume status detail
If for some reason glusterd_get_brick_root() fails, it frees the gf_strdup'ed *mount_point in its own error path, and returns -1. Unfortunately it already had assigned that pointer value to the output argument, the caller function glusterd_add_brick_detail() sees a non-NULL pointer, and free() again: segfault. Could be fixed with a one-liner (*mount_point = NULL) in the error path, but I think glusterd_get_brick_root() should only assign to the output argument once all checks passed, so I use a local temporary pointer, which increases the patch a bit. Change-Id: I3f3035f01e80a5e9bdf2da895e4cf7baa3dfbd2f BUG: 919352 Signed-off-by: Lars Ellenberg <lars@linbit.com> Reviewed-on: http://review.gluster.org/4646 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions