mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	NFC: st21nfca: add missed kfree_skb() in an error path
st21nfca_tm_send_atr_res() misses to call kfree_skb() in an error path.
Add the missed function call to fix it.
Fixes: 1892bf844e ("NFC: st21nfca: Adding P2P support to st21nfca in Initiator & Target mode")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
			
			
This commit is contained in:
		
							parent
							
								
									96d10d5b19
								
							
						
					
					
						commit
						3decabdc71
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -173,9 +173,11 @@ static int st21nfca_tm_send_atr_res(struct nfc_hci_dev *hdev, | ||||||
| 		memcpy(atr_res->gbi, atr_req->gbi, gb_len); | 		memcpy(atr_res->gbi, atr_req->gbi, gb_len); | ||||||
| 		r = nfc_set_remote_general_bytes(hdev->ndev, atr_res->gbi, | 		r = nfc_set_remote_general_bytes(hdev->ndev, atr_res->gbi, | ||||||
| 						  gb_len); | 						  gb_len); | ||||||
| 		if (r < 0) | 		if (r < 0) { | ||||||
|  | 			kfree_skb(skb); | ||||||
| 			return r; | 			return r; | ||||||
| 		} | 		} | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	info->dep_info.curr_nfc_dep_pni = 0; | 	info->dep_info.curr_nfc_dep_pni = 0; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Chuhong Yuan
						Chuhong Yuan