[ofa-general] Re: [PATCH 1/3] OpenSM: Add null dereference checks
Sasha Khapyorsky
sashak at voltaire.com
Wed Dec 12 10:56:23 PST 2007
Hi Al,
On 16:31 Sun 09 Dec , Albert Chu wrote:
>
> > Is it possible/legal usage to have context = NULL in those desctructors?
> > If not, I don't think we need such checks.
>
> I don't think any current code logic in opensm can allow it, but I felt it
> would be prudent to add the checks for future code change safety anyways
I don't like such kind of "for sure" code - segfault is easier to debug
than memory leak :). If in a future it will be needed we can add it then.
> (one of my initial ideas to fix the routing engine reporting issue
> required it). It's also in the ftree destroy function already too.
Probably just remove it there.
Sasha
More information about the general
mailing list