diff options
author | Jakub Jelen <[email protected]> | 2021-11-23 08:38:33 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2021-11-24 01:50:33 +0000 |
commit | 6ee3eb420207c51bc4f2e6aa0871bc8c51f977f0 (patch) | |
tree | 6929baebd3668a431f4c333cba7c992eda3a1ef8 /common/homedir.c | |
parent | dirmngr: Avoid memory leaks on errors (diff) | |
download | gnupg-6ee3eb420207c51bc4f2e6aa0871bc8c51f977f0.tar.gz gnupg-6ee3eb420207c51bc4f2e6aa0871bc8c51f977f0.zip |
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 <[email protected]>
Diffstat (limited to 'common/homedir.c')
-rw-r--r-- | common/homedir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/homedir.c b/common/homedir.c index e1b55f296..174d961e9 100644 --- a/common/homedir.c +++ b/common/homedir.c @@ -636,6 +636,8 @@ unix_rootdir (int want_sysconfdir) es_fclose (fp); xfree (buffer); xfree (line); + xfree (rootdir); + xfree (sysconfdir); checked = 1; return NULL; } |