[stunnel-users] fix resource leaks and potential null

Arthur Mesh arthurmesh at gmail.com
Tue Feb 5 19:44:59 CET 2013

On Tue, Feb 05, 2013 at 01:41:30PM -0500, Brian Wilkins wrote:
> It's a variable that points to null.

Only if you initialize it. It's not initialized during declaration, hence its
value is "garbage" from stack. It's only initialized conditionally later on.

> this is a valid check to see if the
> pointer is null. Coverity is showing a false positive.

I don't see any evidence showing that it's guaranteed to be initialized
before you read its value in:

2113     if(errstr) {
2114         s_log(LOG_ERR, "Service [%s]: %s", section->servname,
2115               errstr);
2116         return 1;
2117     }

In any case. if you're convinced it's a false positive, so be it.

More information about the stunnel-users mailing list