Plug memory leak in set_paths() error path
Leak appeared in commit 91eefc3f
, v4.3.12. Harmless in practice,
since the error is ultimately fatal.
This commit is contained in:
parent
5a77a8186e
commit
8e391f29a1
1 changed files with 3 additions and 1 deletions
|
@ -29,7 +29,7 @@
|
||||||
* Known contributors to this file:
|
* Known contributors to this file:
|
||||||
* Julian Onions, 1995
|
* Julian Onions, 1995
|
||||||
* Steve McClure, 1998-2000
|
* Steve McClure, 1998-2000
|
||||||
* Markus Armbruster, 2004-2009
|
* Markus Armbruster, 2004-2011
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -178,6 +178,8 @@ set_paths(char *econfig)
|
||||||
if (p[0] != '/') {
|
if (p[0] != '/') {
|
||||||
fprintf(stderr, "Can't get current working directory (%s)\n",
|
fprintf(stderr, "Can't get current working directory (%s)\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
if (p != econfig)
|
||||||
|
free(p);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (p == econfig)
|
if (p == econfig)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue