From e5d425593341ecc6d469fa8c23d8dbf7fbb2a0c1 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 6 Nov 2010 13:08:04 +0000 Subject: [PATCH] Init AtExitInfoBlock::fFirstUnused in the constructor. Probably fixes #6793. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39324 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/stdlib/exit.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/system/libroot/posix/stdlib/exit.cpp b/src/system/libroot/posix/stdlib/exit.cpp index ccd3a059da..6edd94aa51 100644 --- a/src/system/libroot/posix/stdlib/exit.cpp +++ b/src/system/libroot/posix/stdlib/exit.cpp @@ -44,6 +44,12 @@ typedef SinglyLinkedList AtExitInfoList; struct AtExitInfoBlock : DoublyLinkedListLinkImpl { + AtExitInfoBlock() + : + fFirstUnused(0) + { + } + bool IsEmpty() const { return fFirstUnused == ATEXIT_MAX && fFreeList.IsEmpty();