#19 clone_result_assertions() potential memory leak

libval
open
None
3
2006-08-15
2006-08-09
No

The CLONE_NAME_LEN macro immediately returns an error if a malloc fails. However, other allocations have also occurred earlier in the code path. Failure to clean up these other allocations before exiting reduces the chances that an app can recover when dealing with low memory conditions.

Discussion

  • Robert Story

    Robert Story - 2006-08-09

    Logged In: YES
    user_id=76148

    sorry, forgot to mention source file is val_assertion.c

     
  • Suresh Krishnaswamy

    • priority: 5 --> 3
     
  • Suresh Krishnaswamy

    Logged In: YES
    user_id=1140008

    memory resource consumption errors are seen as hard errors -- there is no real
    expectation in having the validator continue to execute following such an error.
    So, no real effort is made to clean up any allocated memory. In fact if we want to
    change this assumption now, there are may more instances in the code where
    similar changes would have to be made, not just this macro.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks