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>
@@ -4503,7 +4504,7 @@ zio_done(zio_t *zio)
4503
4504
uint64_t asize = P2ROUNDUP (psize , align );
4504
4505
abd_t * adata = zio -> io_abd ;
4505
4506
4506
- if (asize != psize ) {
4507
+ if (adata != NULL && asize != psize ) {
4507
4508
adata = abd_alloc (asize , B_TRUE );
4508
4509
abd_copy (adata , zio -> io_abd , psize );
4509
4510
abd_zero_off (adata , psize , asize - psize );
@@ -4514,7 +4515,7 @@ zio_done(zio_t *zio)
4514
4515
zcr -> zcr_finish (zcr , adata );
4515
4516
zfs_ereport_free_checksum (zcr );
4516
4517
4517
- if (asize != psize )
4518
+ if (adata != NULL && asize != psize )
4518
4519
abd_free (adata );
4519
4520
}
4520
4521
}
You can’t perform that action at this time.
0 commit comments