xen_disk: fix possible null-ptr dereference
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
		
							parent
							
								
									8efc936336
								
							
						
					
					
						commit
						8cced12143
					
				| 
						 | 
				
			
			@ -589,6 +589,7 @@ static int blk_send_response_one(struct ioreq *ioreq)
 | 
			
		|||
        break;
 | 
			
		||||
    default:
 | 
			
		||||
        dst = NULL;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
    memcpy(dst, &resp, sizeof(resp));
 | 
			
		||||
    blkdev->rings.common.rsp_prod_pvt++;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue