Fix memory leak into join state
This commit is contained in:
		@ -17,10 +17,14 @@ static int ac_dfa_state_join_check_authorizejoin(struct ac_session_t* session, s
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	// Check return value
 | 
						// Check return value
 | 
				
			||||||
	xmlResult = xmlNodeGetContent(response->xmlResponseReturn);
 | 
						xmlResult = xmlNodeGetContent(response->xmlResponseReturn);
 | 
				
			||||||
	if (xmlStrcmp(xmlResult, (const xmlChar *)"true")) {
 | 
						if (!xmlResult) {
 | 
				
			||||||
 | 
							return CAPWAP_RESULTCODE_JOIN_FAILURE_UNKNOWN_SOURCE;
 | 
				
			||||||
 | 
						} else if (xmlStrcmp(xmlResult, (const xmlChar *)"true")) {
 | 
				
			||||||
 | 
							xmlFree(xmlResult);
 | 
				
			||||||
		return CAPWAP_RESULTCODE_JOIN_FAILURE_UNKNOWN_SOURCE;
 | 
							return CAPWAP_RESULTCODE_JOIN_FAILURE_UNKNOWN_SOURCE;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						xmlFree(xmlResult);
 | 
				
			||||||
	return CAPWAP_RESULTCODE_SUCCESS;
 | 
						return CAPWAP_RESULTCODE_SUCCESS;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -354,6 +358,7 @@ static uint32_t ac_dfa_state_join_create_response(struct ac_session_t* session,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	length = xmlStrlen(xmlResult);
 | 
						length = xmlStrlen(xmlResult);
 | 
				
			||||||
	if (!length) {
 | 
						if (!length) {
 | 
				
			||||||
 | 
							xmlFree(xmlResult);
 | 
				
			||||||
		return CAPWAP_RESULTCODE_FAILURE;
 | 
							return CAPWAP_RESULTCODE_FAILURE;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user