On 04/07/2011 04:34 PM, Lucian Horga wrote:
On 04/04/2011 01:36 PM, ext Alberto Mardegan wrote:
On 04/04/2011 01:14 PM, Lucian Horga wrote:
Who allocated "data"? I think this should be a g_free().
data = signature_data (account, key);
it's aegis-crypto function who allocates it so g_free() is not ok here.
aegis_crypto_free (data) is fine.
Unless you forgot to send some patch, it doesn't. The version of signature_data
currently in master doesn't use any aegis-crypto functions.
Same here: g_free.
Same here, as above, aegis_crypto_free (data) is ok.
Same here :-)
+ if (result_verify != aegis_crypto_ok) {
+ *token = NULL;
+ aegis_crypto_finish ();
+ aegis_crypto_free (data);
g_free, and also free the token_name (I'll let you guess how :-) ).
token_name is allocated by aegis-crypto:
Yes,
[...]
and it has been freed here at line 2316:
if (token_name)
aegis_crypto_free (token_name);
which will never be executed in this case, because we are returning from the
function 5 lines above this. Please check my review carefully.
g_free().
Same as above, aegis_crypto_free (data) is fine.
Same here. :-)
Ciao,
Alberto
--
http://blog.mardy.it <-- geek in un lingua international!
_______________________________________________
MeeGo-dev mailing list
MeeGo-dev@meego.com
http://lists.meego.com/listinfo/meego-dev
http://wiki.meego.com/Mailing_list_guidelines