FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 11-23-2011, 09:15 AM
"Fabio M. Di Nitto"
 
Default cman: fix free handle logic

Spotted by Coverity Scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
: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<num_interfaces; i++) {
ss = (struct sockaddr_storage *)ptr;
--
1.7.4.4
 

Thread Tools




All times are GMT. The time now is 06:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org