We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc5b865 commit 97091d4Copy full SHA for 97091d4
src/ansi-c/library/new.c
@@ -99,6 +99,9 @@ inline void __delete(void *ptr)
99
// non-deterministically record as deallocated
100
__CPROVER_bool record;
101
__CPROVER_deallocated=record?ptr:__CPROVER_deallocated;
102
+
103
+ // detect memory leaks
104
+ if(__CPROVER_memory_leak==ptr) __CPROVER_memory_leak=0;
105
}
106
107
@@ -128,5 +131,8 @@ inline void __delete_array(void *ptr)
128
131
129
132
130
133
134
135
136
137
138
0 commit comments