diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2018-07-25 16:00:48 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2018-07-25 16:00:48 +0000 |
commit | 734e362fa1a843128dc1f437ef16427084cdf46f (patch) | |
tree | 0ac21bab705d0fe2be33e25e04a5d0b503a076ec /sbin/bectl/bectl.c | |
parent | 4831c931dd0f2f854971c62921f29710037a7e7e (diff) | |
download | src-734e362fa1a843128dc1f437ef16427084cdf46f.tar.gz src-734e362fa1a843128dc1f437ef16427084cdf46f.zip |
libbe(3)/bectl(8): Provide and use proper alloc/free for property lists
Notes
Notes:
svn path=/projects/bectl/; revision=336715
Diffstat (limited to 'sbin/bectl/bectl.c')
-rw-r--r-- | sbin/bectl/bectl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/bectl/bectl.c b/sbin/bectl/bectl.c index 98a9121a2cf3..74f7130e33c8 100644 --- a/sbin/bectl/bectl.c +++ b/sbin/bectl/bectl.c @@ -28,7 +28,6 @@ #include <sys/param.h> #include <sys/jail.h> -#include <sys/malloc.h> #include <sys/mount.h> #include <errno.h> #include <stdbool.h> @@ -418,6 +417,7 @@ bectl_cmd_list(int argc, char *argv[]) int opt; bool show_all_datasets, show_space, hide_headers, show_snaps; + props = NULL; show_all_datasets = show_space = hide_headers = show_snaps = false; while ((opt = getopt(argc, argv, "aDHs")) != -1) { switch (opt) { @@ -448,7 +448,7 @@ bectl_cmd_list(int argc, char *argv[]) } - if (nvlist_alloc(&props, NV_UNIQUE_NAME, M_WAITOK) != 0) { + if (be_prop_list_alloc(&props) != 0) { fprintf(stderr, "bectl list: failed to allocate prop nvlist\n"); return (1); } @@ -459,7 +459,7 @@ bectl_cmd_list(int argc, char *argv[]) } dump_nvlist(props, 0); - nvlist_free(props); + be_prop_list_free(props); return (0); } |