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) {
 | 
						if (strcmp(port->protocol, "MySQLClient") == 0) {
 | 
				
			||||||
		int loaded;
 | 
							int loaded;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (service->users == NULL) {
 | 
				
			||||||
			/*
 | 
								/*
 | 
				
			||||||
			 * Allocate specific data for MySQL users
 | 
								 * Allocate specific data for MySQL users
 | 
				
			||||||
			 * including hosts and db names
 | 
								 * including hosts and db names
 | 
				
			||||||
@ -245,11 +246,14 @@ GWPROTOCOL	*funcs;
 | 
				
			|||||||
				"Loaded %d MySQL Users for service [%s].",
 | 
									"Loaded %d MySQL Users for service [%s].",
 | 
				
			||||||
				loaded, service->name)));
 | 
									loaded, service->name)));
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
						} 
 | 
				
			||||||
	else 
 | 
						else 
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
							if (service->users == NULL) {
 | 
				
			||||||
			/* Generic users table */
 | 
								/* Generic users table */
 | 
				
			||||||
			service->users = users_alloc();
 | 
								service->users = users_alloc();
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((funcs=(GWPROTOCOL *)load_module(port->protocol, MODULE_PROTOCOL)) 
 | 
						if ((funcs=(GWPROTOCOL *)load_module(port->protocol, MODULE_PROTOCOL)) 
 | 
				
			||||||
		== NULL)
 | 
							== NULL)
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user