public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libhandle: zap fdhash_head in fshandle_destroy
@ 2017-12-06 17:54 Darrick J. Wong
  2017-12-07  6:08 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2017-12-06 17:54 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs

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(+)

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-07  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-06 17:54 [PATCH] libhandle: zap fdhash_head in fshandle_destroy Darrick J. Wong
2017-12-07  6:08 ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox