mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
homedir: Avoid memory leaks on errors
* common/homedir.c (unix_rootdir): Free allocated memory on error path -- GnuPG-bug-id: 5393 Signed-off-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
parent
940af3f052
commit
6ee3eb4202
1 changed files with 2 additions and 0 deletions
|
@ -636,6 +636,8 @@ unix_rootdir (int want_sysconfdir)
|
||||||
es_fclose (fp);
|
es_fclose (fp);
|
||||||
xfree (buffer);
|
xfree (buffer);
|
||||||
xfree (line);
|
xfree (line);
|
||||||
|
xfree (rootdir);
|
||||||
|
xfree (sysconfdir);
|
||||||
checked = 1;
|
checked = 1;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue