lkml.org 
[lkml]   [2014]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH] cifs: set null to username and iocharset after being freed
In function 'expand_dfs_referral' the volume_info->iocharset and
volume_info->username was used after being freed by calling
cleanup_volume_info_contents. Set null to username and iocharset
after being freed.

Signed-off-by: Osmond Sun <osmond.sun@gmail.com>
---
fs/cifs/connect.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 20d75b8..2586a34 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3251,10 +3251,12 @@ static void
cleanup_volume_info_contents(struct smb_vol *volume_info)
{
kfree(volume_info->username);
+ volume_info->username = NULL;
kzfree(volume_info->password);
kfree(volume_info->UNC);
kfree(volume_info->domainname);
kfree(volume_info->iocharset);
+ volume_info->iocharset = NULL;
kfree(volume_info->prepath);
}

--
1.9.0

\
 
 \ /
  Last update: 2014-06-24 10:01    [W:0.049 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site