tests: Fix additional memleaks in thread tests
* tests/gpg/t-thread-keylist-verify.c (start_verify): Release data. (start_keylist): Unref keys. * tests/gpg/t-thread-keylist.c (start_keylist): Unref keys.
This commit is contained in:
parent
4d5174e4a8
commit
d0030efb45
@ -60,7 +60,10 @@ start_keylist (void *arg)
|
||||
err = gpgme_op_keylist_start (ctx, NULL, 0);
|
||||
fail_if_err (err);
|
||||
|
||||
while (!(err = gpgme_op_keylist_next (ctx, &key)));
|
||||
while (!(err = gpgme_op_keylist_next (ctx, &key)))
|
||||
{
|
||||
gpgme_key_unref (key);
|
||||
}
|
||||
|
||||
gpgme_release (ctx);
|
||||
return NULL;
|
||||
@ -103,6 +106,8 @@ start_verify (void *arg)
|
||||
__FILE__, __LINE__, gpgme_strerror (signature->status));
|
||||
exit (1);
|
||||
}
|
||||
gpgme_free (text);
|
||||
gpgme_free (sig);
|
||||
gpgme_release (ctx);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -48,7 +48,10 @@ start_keylist (void *arg)
|
||||
err = gpgme_op_keylist_start (ctx, NULL, 0);
|
||||
fail_if_err (err);
|
||||
|
||||
while (!(err = gpgme_op_keylist_next (ctx, &key)));
|
||||
while (!(err = gpgme_op_keylist_next (ctx, &key)))
|
||||
{
|
||||
gpgme_key_unref (key);
|
||||
}
|
||||
|
||||
gpgme_release (ctx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user