← Back to team overview

kicad-developers team mailing list archive

Re: Bug fixing and Coverity scan errors.

 

> I think it would be good policy to say unless the scope of the pointer
> variable is the local code block, delete must be immediately followed
> by a NULL assignment. i.e. from what I'm looking at now in the
> vrml_v2_modelparser.cpp:241 or :263

>    delete m_model;

>should really be:

>    delete m_model;
>    m_model = NULL;

That should be desirable to set it to NULL.
I am not a C++ expert but, are we missing a "safe delete" thing to use in KiCad?

Mario Luzeiro


Follow ups

References