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>
@@ -4539,7 +4540,7 @@ zio_done(zio_t *zio)
4539
4540
uint64_t asize = P2ROUNDUP (psize , align );
4540
4541
abd_t * adata = zio -> io_abd ;
4541
4542
4542
- if (asize != psize ) {
4543
+ if (adata != NULL && asize != psize ) {
4543
4544
adata = abd_alloc (asize , B_TRUE );
4544
4545
abd_copy (adata , zio -> io_abd , psize );
4545
4546
abd_zero_off (adata , psize , asize - psize );
@@ -4550,7 +4551,7 @@ zio_done(zio_t *zio)
4550
4551
zcr -> zcr_finish (zcr , adata );
4551
4552
zfs_ereport_free_checksum (zcr );
4552
4553
4553
- if (asize != psize )
4554
+ if (adata != NULL && asize != psize )
4554
4555
abd_free (adata );
4555
4556
}
4556
4557
}
You can’t perform that action at this time.
0 commit comments