Stephen Gallagher wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 09/16/2009 11:08 AM, Jakub Hrozek wrote:
> The memset size_t parameter was wrong and the async_ctx param was not
> manually zeroed resulting in random segfaults when the structure was freed.
>
> Jakub
If you're memsetting handle, then you don't need to also explicitly set
handle->async_ctx (or any of the other pointers) to NULL.
If Valgrind is later complaining that testing for NULL is an unitialized
jump or move, that's a bug in Valgrind.
Obviously, valgrind was producing warnings precisely because of the bug
that Jakub's patch fixes. Therefore it was right to complain. I think
the right thing to do right now is to remove all the explicit
initializations and the comment about valgrind complaints.
Martin