mirror of
				https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
				synced 2025-10-31 20:13:58 +00:00 
			
		
		
		
	bsc: Fix possible crash when the lchan->conn alloc failed
Another null pointer dereference found by clang.
This commit is contained in:
		| @@ -478,8 +478,11 @@ int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id) | ||||
| 	} else { | ||||
| 		rc = BSC_API_CONN_POL_REJECT; | ||||
| 		lchan->conn = subscr_con_allocate(msg->lchan); | ||||
| 		if (!lchan->conn) { | ||||
| 			lchan_release(lchan, 0, 0); | ||||
| 			return -1; | ||||
| 		} | ||||
|  | ||||
| 		if (lchan->conn) | ||||
| 		rc = api->compl_l3(lchan->conn, msg, 0); | ||||
|  | ||||
| 		if (rc != BSC_API_CONN_POL_ACCEPT) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user