summaryrefslogtreecommitdiff
path: root/Userland/crash.cpp
diff options
context:
space:
mode:
authorShannon Booth <shannon.ml.booth@gmail.com>2019-12-31 14:41:08 +1300
committerAndreas Kling <awesomekling@gmail.com>2019-12-31 02:43:43 +0100
commit8a0ef921007a41763fcd698da7f9f3ec1aef7037 (patch)
treef18efe822b70acae62b1fd4beea49be9e8e2bfcd /Userland/crash.cpp
parent8dc6fc9aca3ff4158260ba6af50f6ded78188b00 (diff)
downloadserenity-8a0ef921007a41763fcd698da7f9f3ec1aef7037.zip
Crash: Woops! Remove a misplaced if (true)
I was testing with this and must have forgotten to remove it :(
Diffstat (limited to 'Userland/crash.cpp')
-rw-r--r--Userland/crash.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/crash.cpp b/Userland/crash.cpp
index 09c8554260..8666fa6fb4 100644
--- a/Userland/crash.cpp
+++ b/Userland/crash.cpp
@@ -189,7 +189,7 @@ int main(int argc, char** argv)
if (mode == ReadFromFreedMemory || mode == TestAllCrashTypes) {
Crash("Read from freed memory", []() {
auto* uninitialized_memory = (volatile u32**)malloc(1024);
- if (true)
+ if (!uninitialized_memory)
return Crash::Failure::UnexpectedError;
free(uninitialized_memory);