[SSSD] [PATCHES] Fix several warnings/potential bugs

Simo Sorce ssorce at redhat.com
Tue Dec 8 16:41:03 UTC 2009


On Tue, 2009-12-08 at 11:27 -0500, Stephen Gallagher wrote:
> Patch 0001: We weren't checking that the asprintf was successfully
> allocating memory. I converted it to talloc_asprintf() for uniformity
> as
> well.
> 
> Patch 0002: If grouplist was a zero-length array, we would return ret
> unitialized.
> 
> Patch 0003: If we jumped to the end before the for-loop, it was
> possible
> that we would return an unitialized value of count. It's unlikely that
> we would ever trust this value, but this patch eliminates the compiler
> warning.
> 
> Patch 0004: If we fell into the default case of the switch statement,
> we
> would attempt to talloc_free() a random memory location. This patch
> guarantees that sdp_req is NULL if it has not been initialized.

ACK all.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York




More information about the sssd-devel mailing list