git: 99931db675d4 - releng/13.1 - libbe: fix be_mounted_at() with props after bootonce

From: Kyle Evans <kevans_at_FreeBSD.org>
Date: Wed, 06 Apr 2022 14:33:18 UTC
The branch releng/13.1 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=99931db675d4d1ac702120f89a060fec1b152ae7

commit 99931db675d4d1ac702120f89a060fec1b152ae7
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2022-03-31 19:18:14 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2022-04-06 14:32:44 +0000

    libbe: fix be_mounted_at() with props after bootonce
    
    propinfo.bootonce was filled with garbage, leading to a segfault later
    during prop building.  Initialize it to NULL.
    
    Approved by:    re (gjb)
    
    (cherry picked from commit d155d8e138563c0b39c658684e6a4fe6e2e36f8a)
    (cherry picked from commit 6ce8e35cead46048d9ae3c1dabafe1ef4ed26f97)
---
 lib/libbe/be_access.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/libbe/be_access.c b/lib/libbe/be_access.c
index 9f7ad32599ac..ec966bc85fb7 100644
--- a/lib/libbe/be_access.c
+++ b/lib/libbe/be_access.c
@@ -219,6 +219,7 @@ be_mounted_at(libbe_handle_t *lbh, const char *path, nvlist_t *details)
 			propinfo.lbh = lbh;
 			propinfo.list = details;
 			propinfo.single_object = false;
+			propinfo.bootonce = NULL;
 			prop_list_builder_cb(root_hdl, &propinfo);
 			zfs_close(root_hdl);
 		}