Fix memory leak.

* libmisc/setupenv.c: Free pw_dir and pw_shell before reallocating
	them.
This commit is contained in:
Nicolas François
2013-08-02 20:28:24 +02:00
parent b6c1a8579e
commit ee1952424d
2 changed files with 4 additions and 0 deletions

View File

@@ -3,6 +3,8 @@
* libmisc/setupenv.c: xstrdup the static char* temp_pw_dir /
temp_pw_shell. That way we can continue to use pw_free() without
segving. Thanks to Serge Hallyn for the patch.
* libmisc/setupenv.c: Free pw_dir and pw_shell before reallocating
them.
2013-08-01 Yuri Kozlov <yuray@komyakino.ru>