1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01: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:
Jakub Jelen 2021-11-23 09:38:33 +01:00 committed by NIIBE Yutaka
parent 940af3f052
commit 6ee3eb4202

View File

@ -636,6 +636,8 @@ unix_rootdir (int want_sysconfdir)
es_fclose (fp);
xfree (buffer);
xfree (line);
xfree (rootdir);
xfree (sysconfdir);
checked = 1;
return NULL;
}