summaryrefslogtreecommitdiffstats
path: root/utils/mount/network.c
diff options
context:
space:
mode:
authorJianhong Yin <yin-jianhong@163.com>2017-02-02 06:21:15 -0500
committerSteve Dickson <steved@redhat.com>2017-02-02 06:21:15 -0500
commit0712b5507866d6b3c900623eb1f81fffaec80ae2 (patch)
tree2d5e2910b1305d98caf2e2b3bd7653d62ac1a51f /utils/mount/network.c
parent99e1a48511ea90efc40f7faf7d6fc29b28876695 (diff)
downloadnfs-utils-0712b5507866d6b3c900623eb1f81fffaec80ae2.tar.gz
nfs-utils-0712b5507866d6b3c900623eb1f81fffaec80ae2.tar.xz
nfs-utils-0712b5507866d6b3c900623eb1f81fffaec80ae2.zip
mount: fix mount fail that caused by uninitialized struct
From: "Jianhong.Yin" <yin-jianhong@163.com> recent changes of utils/mount cause a regression mount fail: https://bugzilla.redhat.com/show_bug.cgi?id=1415024 can not reproduce it on x86_64(gcc on x86_64 might do struct initialize by default, I'm not sure). but it can be reproduced always on platform ppc64le aarch64. Signed-off-by: Jianhong Yin <yin-jianhong@163.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mount/network.c')
-rw-r--r--utils/mount/network.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/mount/network.c b/utils/mount/network.c
index 7dceb2d..d1c8fec 100644
--- a/utils/mount/network.c
+++ b/utils/mount/network.c
@@ -1638,6 +1638,7 @@ int nfs_options2pmap(struct mount_options *options,
struct pmap *nfs_pmap, struct pmap *mnt_pmap)
{
struct nfs_version version;
+ memset(&version, 0, sizeof(version));
if (!nfs_nfs_program(options, &nfs_pmap->pm_prog))
return 0;