diff mbox

[1/5] libhandle: zap fdhash in fshandle_destroy

Message ID 151500481167.7713.14079138301635732058.stgit@magnolia (mailing list archive)
State Accepted
Headers show

Commit Message

Darrick J. Wong Jan. 3, 2018, 6:40 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Set fdhash_head to zero once we've destroyed the handle list to avoid
dangling pointer problems.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 libhandle/handle.c |    1 +
 1 file changed, 1 insertion(+)



--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/libhandle/handle.c b/libhandle/handle.c
index e6971dd..878d14d 100644
--- a/libhandle/handle.c
+++ b/libhandle/handle.c
@@ -73,6 +73,7 @@  fshandle_destroy(void)
 		free(h);
 		h = nexth;
 	}
+	fdhash_head = NULL;
 }
 
 int