From 963c2f83becc757fe3e227408888d6af6b2c4319 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 31 Jul 2011 10:59:46 +1000 Subject: [PATCH] Initialize the rootfh handle when creating the nfs context or else we will try to free a wild pointer if the mount failed and we proceed to call nfs_destroy_context(); --- lib/libnfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libnfs.c b/lib/libnfs.c index c3904bf..edaeca4 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -147,6 +147,9 @@ struct nfs_context *nfs_init_context(void) nfs->server = NULL; nfs->export = NULL; + nfs->rootfh.data.data_len = 0; + nfs->rootfh.data.data_val = NULL; + return nfs; } -- 2.34.1