Commit e36d93e6 authored by Shawn Webb's avatar Shawn Webb
Browse files

Check for libzfs_init failure


Signed-off-by: Shawn Webb's avatarShawn Webb <shawn.webb@hardenedbsd.org>
Pointy-Hat:	Shawn Webb
parent a0964498
......@@ -63,6 +63,11 @@ lattzfs_ctx_new(const char *pool, uint64_t flags)
}
ctx->lc_zfs_handle = libzfs_init();
if (ctx->lc_zfs_handle == NULL) {
free(ctx);
free(ctx->lc_pool_name);
return (NULL);
}
if (!(flags & LATTZFS_FLAG_LAZY_OPEN)) {
if (!_lattzfs_pool_open(ctx)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment