mirror of
				https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
				synced 2025-11-04 05:53:26 +00:00 
			
		
		
		
	libmsc: Set the "trans->conn" to NULL to catch invalid usage
Make finding use-after-free more easy and set it to NULL.
This commit is contained in:
		@@ -113,7 +113,7 @@ void trans_free(struct gsm_trans *trans)
 | 
				
			|||||||
	if (trans->conn)
 | 
						if (trans->conn)
 | 
				
			||||||
		msc_release_connection(trans->conn);
 | 
							msc_release_connection(trans->conn);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						trans->conn = NULL;
 | 
				
			||||||
	talloc_free(trans);
 | 
						talloc_free(trans);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user