Removed leak for service with more listeners
Removed leak for service with more listeners: users are allocated once in service
This commit is contained in:
		@ -213,6 +213,7 @@ GWPROTOCOL	*funcs;
 | 
			
		||||
	if (strcmp(port->protocol, "MySQLClient") == 0) {
 | 
			
		||||
		int loaded;
 | 
			
		||||
 | 
			
		||||
		if (service->users == NULL) {
 | 
			
		||||
			/*
 | 
			
		||||
			 * Allocate specific data for MySQL users
 | 
			
		||||
			 * including hosts and db names
 | 
			
		||||
@ -245,11 +246,14 @@ GWPROTOCOL	*funcs;
 | 
			
		||||
				"Loaded %d MySQL Users for service [%s].",
 | 
			
		||||
				loaded, service->name)));
 | 
			
		||||
		}
 | 
			
		||||
	} 
 | 
			
		||||
	else 
 | 
			
		||||
	{
 | 
			
		||||
		if (service->users == NULL) {
 | 
			
		||||
			/* Generic users table */
 | 
			
		||||
			service->users = users_alloc();
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ((funcs=(GWPROTOCOL *)load_module(port->protocol, MODULE_PROTOCOL)) 
 | 
			
		||||
		== NULL)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user