Closed Ton-Pe closed 4 weeks ago
Case 1:
Following code gives a false positive. Size of memptr is set inside the block and then released outside that block.
DEFINE VARIABLE mReceiveData AS MEMPTR NO-UNDO. IF TRUE THEN DO: SET-SIZE(mReceiveData) = 100. END. SET-SIZE(mReceiveData) = 0.
If release is done inside the same block or moved to finally-block, then issue is not raised.
+1
Fixed in develop branch, will be included in next release
Case 1:
Following code gives a false positive. Size of memptr is set inside the block and then released outside that block.
If release is done inside the same block or moved to finally-block, then issue is not raised.
Case 2:
Following code where copy-lob is done inside a nested block, gives false positive.
For a comparison, this code, where there is only one block, issue is not raised:
This is similar to issue #1121 in DynamicObjectLeak rule