Menu

false positive for "Mismatching allocation and deallocation"

Zaskar
2024-07-01
2024-07-01
  • Zaskar

    Zaskar - 2024-07-01

    Hi. Here's a little example that triggers "Mismatching allocation and deallocation". Tested with latest available code (git 29adee864c2499ff8dc19f6aab067e0aa8fe10c5). The cpp contains two cases with the same "logic", first one distributed between a class' constructor and destructor, second one all inside a single function. First one is wrongly flagged as error, second one is ok.

     
  • CHR

    CHR - 2024-07-01

    Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/12890

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.