From 6bd1798e2a619e4c57426611309c6a2498a77e9c Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Thu, 10 Dec 2009 11:23:47 -0500 Subject: [PATCH] We have to free the buffers allocated by the XDR routines when decoding the mount response after copying them to their final place. From: Krisztian Kovacs --- ChangeLog | 6 ++++++ amd/ops_nfs.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 29808612..849029b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-12-10 Christos Zoulas + + * We have to free the buffers allocated by the XDR routines when + decoding the mount response after copying them to their final place. + From: Krisztian Kovacs + 2009-12-09 Christos Zoulas * Free continuation in amfs_retry() if we don't call amfs_bgmount() diff --git a/amd/ops_nfs.c b/amd/ops_nfs.c index c0b1a14f..8ce976db 100644 --- a/amd/ops_nfs.c +++ b/amd/ops_nfs.c @@ -201,6 +201,10 @@ got_nfs_fh_mount(voidp pkt, int len, struct sockaddr_in *sa, struct sockaddr_in memmove(fp->fh_nfs_handle.v3.am_fh3_data, res3.mountres3_u.mountinfo.fhandle.fhandle3_val, fp->fh_nfs_handle.v3.am_fh3_length); + + XFREE(res3.mountres3_u.mountinfo.fhandle.fhandle3_val); + if (res3.mountres3_u.mountinfo.auth_flavors.auth_flavors_val) + XFREE(res3.mountres3_u.mountinfo.auth_flavors.auth_flavors_val); } else { #endif /* HAVE_FS_NFS3 */ memset(&res, 0, sizeof(res)); -- 2.43.0