mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
common: Fix memory leaks.
* common/ccparray.c (ccparray_put): Free old array. * common/stringhelp.c (do_make_filename): Free 'home'. * common/t-convert.c: Fix trivial memory leaks. * common/t-iobuf.c: Likewise. * common/t-mbox-util.c: Likewise. * common/t-name-value.c: Likewise. * common/t-stringhelp.c: Likewise. * common/t-strlist.c: Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
b1e8e0d4b9
commit
c14ef10fc3
8 changed files with 32 additions and 3 deletions
|
@ -387,19 +387,19 @@ run_modification_tests (void)
|
|||
if (private_key_mode)
|
||||
{
|
||||
err = nvc_set_private_key (pk, key);
|
||||
gcry_sexp_release (key);
|
||||
assert (err == 0);
|
||||
|
||||
buf = nvc_to_string (pk);
|
||||
assert (strcmp (buf, "Key: (hello world)\n") == 0);
|
||||
xfree (buf);
|
||||
nvc_release (pk);
|
||||
}
|
||||
else
|
||||
{
|
||||
err = nvc_set_private_key (pk, key);
|
||||
assert (gpg_err_code (err) == GPG_ERR_MISSING_KEY);
|
||||
}
|
||||
gcry_sexp_release (key);
|
||||
nvc_release (pk);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue