summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2019-07-22 11:35:12 +0200
committerKarel Zak2019-07-22 11:35:12 +0200
commit68cf159b0703b0886a11750237d7fa8b1a9066eb (patch)
treeaa3b92664917c3778a21a85d9679f27e8b3d3a04
parentfstrim: fix systemd service protection (diff)
parentlibfdisk: Fix double free of *_chs strings in fdisk_partition (diff)
downloadkernel-qcow2-util-linux-68cf159b0703b0886a11750237d7fa8b1a9066eb.tar.gz
kernel-qcow2-util-linux-68cf159b0703b0886a11750237d7fa8b1a9066eb.tar.xz
kernel-qcow2-util-linux-68cf159b0703b0886a11750237d7fa8b1a9066eb.zip
Merge branch 'master_fix-partition-copy' of https://github.com/vojtechtrefny/util-linux
-rw-r--r--libfdisk/src/partition.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libfdisk/src/partition.c b/libfdisk/src/partition.c
index 05474a041..55ce1ca5c 100644
--- a/libfdisk/src/partition.c
+++ b/libfdisk/src/partition.c
@@ -100,6 +100,10 @@ static struct fdisk_partition *__copy_partition(struct fdisk_partition *o)
n->fsuuid = strdup(o->fsuuid);
if (o->fslabel)
n->fslabel = strdup(o->fslabel);
+ if (o->start_chs)
+ n->start_chs = strdup(o->start_chs);
+ if (o->end_chs)
+ n->end_chs = strdup(o->end_chs);
return n;
}