diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2002-11-12 20:26:52 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2002-11-12 20:26:52 +0000 |
| commit | a872d3c73b53b932dc0c378941ea18bad07cba58 (patch) | |
| tree | 0f28548e591f6c95654ff324015783586e5cf378 | |
| parent | cb505683e3f0f8ccd114c73990cb019f62b1beaa (diff) | |
Notes
| -rw-r--r-- | usr.sbin/sade/label.c | 9 | ||||
| -rw-r--r-- | usr.sbin/sysinstall/label.c | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index 247c5332edb4..9e1f5f74beb5 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/label.c @@ -344,6 +344,7 @@ get_mountpoint(struct chunk *old) { char *val; PartInfo *tmp; + Boolean newfs; if (old && old->private_data) tmp = old->private_data; @@ -384,9 +385,13 @@ get_mountpoint(struct chunk *old) else if (old) old->flags &= ~CHUNK_IS_ROOT; - safe_free(tmp); + newfs = FALSE; + if (tmp) { + newfs = tmp->newfs; + safe_free(tmp); + } val = string_skipwhite(string_prune(val)); - tmp = new_part(val, TRUE, 0); + tmp = new_part(val, newfs, 0); if (old) { old->private_data = tmp; old->private_free = safe_free; diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c index 247c5332edb4..9e1f5f74beb5 100644 --- a/usr.sbin/sysinstall/label.c +++ b/usr.sbin/sysinstall/label.c @@ -344,6 +344,7 @@ get_mountpoint(struct chunk *old) { char *val; PartInfo *tmp; + Boolean newfs; if (old && old->private_data) tmp = old->private_data; @@ -384,9 +385,13 @@ get_mountpoint(struct chunk *old) else if (old) old->flags &= ~CHUNK_IS_ROOT; - safe_free(tmp); + newfs = FALSE; + if (tmp) { + newfs = tmp->newfs; + safe_free(tmp); + } val = string_skipwhite(string_prune(val)); - tmp = new_part(val, TRUE, 0); + tmp = new_part(val, newfs, 0); if (old) { old->private_data = tmp; old->private_free = safe_free; |
