Bug 191763 - memory leak in services.c
memory leak in services.c
Status: CLOSED CURRENTRELEASE
Product: Red Hat Cluster Suite
Classification: Red Hat
Component: magma-plugins (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Lon Hohberger
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-15 13:25 EDT by Lon Hohberger
Modified: 2009-04-16 16:20 EDT (History)
1 user (show)

See Also:
Fixed In Version: RHCS4.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-15 13:33:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Lon Hohberger 2006-05-15 13:25:52 EDT
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 13:29:57 EDT
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.