Mercurial > illumos > illumos-gate
changeset 10885:d664ad46732b
6885730 beadm create can core dump due to bug in z_set_zone_root()
author | Abhinandan Ekande <Abhinandan.Ekande@Sun.COM> |
---|---|
date | Tue, 27 Oct 2009 14:28:52 +0530 |
parents | bec3912d153a |
children | 552a766979f8 |
files | usr/src/lib/libinstzones/common/zones.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/libinstzones/common/zones.c Mon Oct 26 23:02:25 2009 -0700 +++ b/usr/src/lib/libinstzones/common/zones.c Tue Oct 27 14:28:52 2009 +0530 @@ -1231,9 +1231,9 @@ } /* free any existing cached root path */ - if (*_z_global_data._z_root_dir != '\0') { free(_z_global_data._z_root_dir); + _z_global_data._z_root_dir = NULL; } /* store duplicate of new zone root path */ @@ -1241,7 +1241,7 @@ if (*rootdir != '\0') { _z_global_data._z_root_dir = _z_strdup(rootdir); } else { - *_z_global_data._z_root_dir = '\0'; + _z_global_data._z_root_dir = ""; } /* set zone root path */