[Spice-devel] [PATCH GTK 1/4] more simplification of spice_smartcard_manager_init_libcacard

Christophe Fergeau cfergeau at redhat.com
Tue Jul 5 04:13:19 PDT 2011


On Tue, Jul 05, 2011 at 01:01:54PM +0200, Marc-André Lureau wrote:
> We don't see it in the diff, but the resulting code may leak here:
> 
>     g_object_get(G_OBJECT(session),
>                  "smartcard-db", &dbname,
>                  "smartcard-certificates", &certificates,
>                  NULL);
> 
>     if ((certificates == NULL) || (g_strv_length(certificates) != 3))
>         goto init;
> 
> Either dbname, certificates or both.

/me hides :(((
Yep, let's drop the patch

> Btw, shouldn't we print a warning/error if g_strv_length(certificates) != 3 ?

Sounds like we should GErrors to the API... (applies also to your comments
for patch 4/4)

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20110705/4f8eb035/attachment.pgp>


More information about the Spice-devel mailing list