File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 25
25
* Copyright (c) 2017, Intel Corporation.
26
26
* Copyright (c) 2019, Klara Inc.
27
27
* Copyright (c) 2019, Allan Jude
28
+ * Copyright (c) 2021, Datto, Inc.
28
29
*/
29
30
30
31
#include <sys/sysmacros.h>
@@ -4559,7 +4560,7 @@ zio_done(zio_t *zio)
4559
4560
uint64_t asize = P2ROUNDUP (psize , align );
4560
4561
abd_t * adata = zio -> io_abd ;
4561
4562
4562
- if (asize != psize ) {
4563
+ if (adata != NULL && asize != psize ) {
4563
4564
adata = abd_alloc (asize , B_TRUE );
4564
4565
abd_copy (adata , zio -> io_abd , psize );
4565
4566
abd_zero_off (adata , psize , asize - psize );
@@ -4570,7 +4571,7 @@ zio_done(zio_t *zio)
4570
4571
zcr -> zcr_finish (zcr , adata );
4571
4572
zfs_ereport_free_checksum (zcr );
4572
4573
4573
- if (asize != psize )
4574
+ if (adata != NULL && asize != psize )
4574
4575
abd_free (adata );
4575
4576
}
4576
4577
}
You can’t perform that action at this time.
0 commit comments