Bug 191763 - memory leak in services.c
Summary: memory leak in services.c
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Cluster Suite
Classification: Retired
Component: magma-plugins
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-15 17:25 UTC by Lon Hohberger
Modified: 2009-04-16 20:20 UTC (History)
1 user (show)

Fixed In Version: RHCS4.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-15 17:33:29 UTC
Embargoed:


Attachments (Terms of Use)

Description Lon Hohberger 2006-05-15 17:25:52 UTC
Description of problem:

SSIA

Double allocation of member list if getting the membership of a group from
outside (eg clustat).

Fix:

--- cluster/magma-plugins/sm/services.c	2005/12/09 17:00:49
+++ cluster/magma-plugins/sm/services.c	2006/05/15 16:50:00
@@ -235,8 +235,6 @@
 	} while (ioctl(sockfd, SIOCCLUSTER_GETMEMBERS, &cman_nl) !=
 		 cman_nl.max_members);
 
-	/* Another biggie */
-	foo = malloc(cml_size(cman_nl.max_members));
 	assert(foo != NULL);
 	strncpy(foo->cml_groupname, groupname, sizeof(foo->cml_groupname));

Comment 1 Lon Hohberger 2006-05-15 17:29:57 UTC
Over a long time of running clustat, this will cause OOM conditions


Note You need to log in before you can comment on or make changes to this bug.