From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio M. Di Nitto Date: Wed, 23 Nov 2011 11:15:40 +0100 Subject: [Cluster-devel] [PATCH 21/41] cman: fix free handle logic In-Reply-To: <1322043360-17037-1-git-send-email-fdinitto@redhat.com> References: <1322043360-17037-1-git-send-email-fdinitto@redhat.com> Message-ID: <1fa34c01ba385de35da10b2beb98ef1885d19e58.1322043045.git.fdinitto@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Spotted by Coverity Scan Signed-off-by: Fabio M. Di Nitto --- :100644 100644 284b351... 6b61332... M cman/daemon/commands.c cman/daemon/commands.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c index 284b351..6b61332 100644 --- a/cman/daemon/commands.c +++ b/cman/daemon/commands.c @@ -563,8 +563,6 @@ static int do_cmd_get_extrainfo(char *cmdbuf, char **retbuf, int retsize, int *r corosync->object_find_create(OBJECT_PARENT_HANDLE, "totem", strlen("totem"), &totem_find_handle); if (corosync->object_find_next(totem_find_handle, &totem_object_handle) == 0) { - corosync->object_find_destroy(totem_find_handle); - corosync->object_find_create(totem_object_handle, "interface", strlen("interface"), &iface_find_handle); while (corosync->object_find_next(iface_find_handle, &object_handle) == 0) { @@ -589,8 +587,10 @@ static int do_cmd_get_extrainfo(char *cmdbuf, char **retbuf, int retsize, int *r } ptr += sizeof(struct sockaddr_storage); } + + corosync->object_find_destroy(iface_find_handle); } - corosync->object_find_destroy(iface_find_handle); + corosync->object_find_destroy(totem_find_handle); for (i=0; i