From: Ronnie Sahlberg Date: Sun, 31 Jul 2011 00:59:46 +0000 (+1000) Subject: Initialize the rootfh handle when creating the nfs context or else X-Git-Tag: upstream/1.9.6^2~337 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=963c2f83becc757fe3e227408888d6af6b2c4319;p=deb_libnfs.git 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(); --- 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; }