summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Libraries/LibC/malloc.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibC/malloc.cpp b/Libraries/LibC/malloc.cpp
index 7ad9f087ae..7495966366 100644
--- a/Libraries/LibC/malloc.cpp
+++ b/Libraries/LibC/malloc.cpp
@@ -1,5 +1,6 @@
#include <AK/Bitmap.h>
#include <AK/InlineLinkedList.h>
+#include <AK/ScopedValueRollback.h>
#include <AK/Vector.h>
#include <LibCore/CLock.h>
#include <assert.h>
@@ -204,6 +205,8 @@ void* malloc(size_t size)
void free(void* ptr)
{
+ ScopedValueRollback rollback(errno);
+
if (!ptr)
return;