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
|
@ -538,6 +538,7 @@ do_make_filename (int xmode, const char *first_part, va_list arg_ptr)
|
|||
home_buffer = xtrymalloc (n);
|
||||
if (!home_buffer)
|
||||
{
|
||||
xfree (home);
|
||||
xfree (name);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -556,6 +557,7 @@ do_make_filename (int xmode, const char *first_part, va_list arg_ptr)
|
|||
else
|
||||
strcpy (stpcpy (stpcpy (p, home), "/"), name);
|
||||
|
||||
xfree (home);
|
||||
xfree (name);
|
||||
name = home_buffer;
|
||||
/* Let's do a simple compression to catch the most common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue