Hm.... I missed that one.

I don't like this patch...

the gc_new() and gc_free() should be called once per function at
prolog and epilog. This is the whole point of gc, otherwise there is
no difference between it and simple malloc.

So:
1. in pkcs11.c it should be moved out of the loop.
2. In verify_cert, verify_callback we should add cleanup label.

Alon.

On Sat, Mar 31, 2012 at 12:04 AM, David Sommerseth
<openvpn.l...@topphemmelig.net> wrote:
> On 14/02/12 11:11, Adriaan de Jong wrote:
>> A number of the x509 functions allocated memory directly, instead of
>> using the default OpenVPN convention: the garbage collector. This is
>> fixed in this series of patches.
>>
>> Adriaan
>
> These patches got ACKed by James and me at the developers meeting
> yesterday.  They are now applied to the master branch on -testing and
> -stable trees.
>
>
> commit 8e5613c2a8545a67cab2734569a8f088100d731b
> Author: Adriaan de Jong <dej...@fox-it.com>
> Date:   Tue Feb 14 11:11:26 2012 +0100
>
>    Migrated x509_get_sha1_hash to use the garbage collector
>
>    Signed-off-by: Adriaan de Jong <dej...@fox-it.com>
>    Acked-by: James Yonan <ja...@openvpn.net>
>    Acked-by: David Sommerseth <dav...@redhat.com>
>    Signed-off-by: David Sommerseth <dav...@redhat.com>
>
> commit 025f30d7c6434aaf0ab4af3744f76aaf8c0b71d6
> Author: Adriaan de Jong <dej...@fox-it.com>
> Date:   Tue Feb 14 11:11:25 2012 +0100
>
>    Migrated x509_get_serial to use the garbage collector
>
>    Signed-off-by: Adriaan de Jong <dej...@fox-it.com>
>    Acked-by: James Yonan <ja...@openvpn.net>
>    Acked-by: David Sommerseth <dav...@redhat.com>
>    Signed-off-by: David Sommerseth <dav...@redhat.com>
>
> commit 00b973f8af85c3ea8fa3cef80eec55e8dc139b27
> Author: Adriaan de Jong <dej...@fox-it.com>
> Date:   Tue Feb 14 11:11:24 2012 +0100
>
>    Migrated x509_get_subject to use of the garbage collector
>
>    This also cleans up a messy call in pkcs11.c to
> _openssl_get_subject, as discussed at FOSDEM.
>
>    Signed-off-by: Adriaan de Jong <dej...@fox-it.com>
>    Acked-by: James Yonan <ja...@openvpn.net>
>    Acked-by: David Sommerseth <dav...@redhat.com>
>    Signed-off-by: David Sommerseth <dav...@redhat.com>
>
>
> kind regards,
>
> David Sommerseth
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Openvpn-devel mailing list
> Openvpn-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openvpn-devel
>

Reply via email to