@@ -209,119 +209,3 @@ class NewArrayAllocationExpr extends AllocationExpr, NewArrayExpr {
209209 result = getAllocatedType ( ) .getSize ( )
210210 }
211211}
212-
213- /**
214- * A deallocation function such as `free`.
215- */
216- class StandardDeallocationFunction extends DeallocationFunction {
217- int freedArg ;
218-
219- StandardDeallocationFunction ( ) {
220- exists ( string name |
221- hasGlobalName ( name ) and
222- (
223- name = "free" and freedArg = 0
224- or
225- name = "realloc" and freedArg = 0
226- )
227- or
228- hasGlobalOrStdName ( name ) and
229- (
230- name = "ExFreePoolWithTag" and freedArg = 0
231- or
232- name = "ExFreeToLookasideListEx" and freedArg = 1
233- or
234- name = "ExFreeToPagedLookasideList" and freedArg = 1
235- or
236- name = "ExFreeToNPagedLookasideList" and freedArg = 1
237- or
238- name = "ExDeleteTimer" and freedArg = 0
239- or
240- name = "IoFreeMdl" and freedArg = 0
241- or
242- name = "IoFreeWorkItem" and freedArg = 0
243- or
244- name = "IoFreeErrorLogEntry" and freedArg = 0
245- or
246- name = "MmFreeContiguousMemory" and freedArg = 0
247- or
248- name = "MmFreeContiguousMemorySpecifyCache" and freedArg = 0
249- or
250- name = "MmFreeNonCachedMemory" and freedArg = 0
251- or
252- name = "MmFreeMappingAddress" and freedArg = 0
253- or
254- name = "MmFreePagesFromMdl" and freedArg = 0
255- or
256- name = "MmUnmapReservedMapping" and freedArg = 0
257- or
258- name = "MmUnmapLockedPages" and freedArg = 0
259- or
260- name = "LocalFree" and freedArg = 0
261- or
262- name = "GlobalFree" and freedArg = 0
263- or
264- name = "HeapFree" and freedArg = 2
265- or
266- name = "VirtualFree" and freedArg = 0
267- or
268- name = "CoTaskMemFree" and freedArg = 0
269- or
270- name = "SysFreeString" and freedArg = 0
271- or
272- name = "LocalReAlloc" and freedArg = 0
273- or
274- name = "GlobalReAlloc" and freedArg = 0
275- or
276- name = "HeapReAlloc" and freedArg = 2
277- or
278- name = "CoTaskMemRealloc" and freedArg = 0
279- )
280- )
281- }
282-
283- override int getFreedArg ( ) {
284- result = freedArg
285- }
286- }
287-
288- /**
289- * An deallocation expression that is a function call, such as call to `free`.
290- */
291- class CallDeallocationExpr extends DeallocationExpr , FunctionCall {
292- DeallocationFunction target ;
293-
294- CallDeallocationExpr ( ) {
295- target = getTarget ( )
296- }
297-
298- override Expr getFreedExpr ( ) {
299- result = getArgument ( target .getFreedArg ( ) )
300- }
301- }
302-
303- /**
304- * An deallocation expression that is a `delete` expression.
305- */
306- class DeleteDeallocationExpr extends DeallocationExpr , DeleteExpr {
307- DeleteDeallocationExpr ( ) {
308- this instanceof DeleteExpr
309- }
310-
311- override Expr getFreedExpr ( ) {
312- result = getExpr ( )
313- }
314- }
315-
316- /**
317- * An deallocation expression that is a `delete []` expression.
318- */
319- class DeleteArrayDeallocationExpr extends DeallocationExpr , DeleteArrayExpr {
320- DeleteArrayDeallocationExpr ( ) {
321- this instanceof DeleteArrayExpr
322- }
323-
324- override Expr getFreedExpr ( ) {
325- result = getExpr ( )
326- }
327- }
0 commit comments