]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libhandle: zap fdhash in fshandle_destroy
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 4 Jan 2018 19:58:29 +0000 (13:58 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 4 Jan 2018 19:58:29 +0000 (13:58 -0600)
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>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libhandle/handle.c

index e6971dd3062a8d383b4ac08ae108029ae55bcc9e..878d14d853ac61968e97659b618863843e2b9c4b 100644 (file)
@@ -73,6 +73,7 @@ fshandle_destroy(void)
                free(h);
                h = nexth;
        }
+       fdhash_head = NULL;
 }
 
 int