mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	Fix -Wuse-after-free warning in dbuf_issue_final_prefetch_done()
Move the use of the private pointer after it is freed.  It's only
used as a tag so a dereference would never occur, but there's no
harm in inverting the order to resolve the warning.
    module/zfs/dbuf.c: In function 'dbuf_issue_final_prefetch_done':
    module/zfs/dbuf.c:3204:17: error:
    pointer 'private' may be used after 'free' [-Werror=use-after-free]
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #13528
Closes #13575
			
			
This commit is contained in:
		
							parent
							
								
									087f5dedd5
								
							
						
					
					
						commit
						6a81173026
					
				| @ -3136,9 +3136,10 @@ dbuf_issue_final_prefetch_done(zio_t *zio, const zbookmark_phys_t *zb, | |||||||
| 	(void) zio, (void) zb, (void) iobp; | 	(void) zio, (void) zb, (void) iobp; | ||||||
| 	dbuf_prefetch_arg_t *dpa = private; | 	dbuf_prefetch_arg_t *dpa = private; | ||||||
| 
 | 
 | ||||||
| 	dbuf_prefetch_fini(dpa, B_TRUE); |  | ||||||
| 	if (abuf != NULL) | 	if (abuf != NULL) | ||||||
| 		arc_buf_destroy(abuf, private); | 		arc_buf_destroy(abuf, private); | ||||||
|  | 
 | ||||||
|  | 	dbuf_prefetch_fini(dpa, B_TRUE); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Brian Behlendorf
						Brian Behlendorf