[PATCH] [CIFS] Fix possible double free if search immediately

From: Shirish Pargaonkar
Date: Thu Jul 24 2008 - 10:48:33 EST


[ Upstream commit 76c510ad2e7d56cfe8f2cc7b23783e5c687cf704 ]

Signed-off-by: Shirish Pargaonkar <shirishp@xxxxxxxxxx>
Signed-off-by: Steve French <sfrench@xxxxxxxxxx>
CC: Oliver Pinter <oliver.pntr@xxxxxxxxx>

diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 83f3069..5f40ed3 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -690,6 +690,7 @@ static int find_cifs_entry(const int xid, struct
cifsTconInfo *pTcon,
else
cifs_buf_release(cifsFile->srch_inf.
ntwrk_buf_start);
+ cifsFile->srch_inf.ntwrk_buf_start = NULL;
}
rc = initiate_cifs_search(xid, file);
if (rc) {


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/