Merge pull request #66 from julian-klode/pu/fix-pbuf-null

Fix compilation error in get_config_path()
This commit is contained in:
Adam Hamsik 2018-04-04 12:36:16 +02:00 committed by GitHub
commit 2bdf74d5a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,8 @@ char *get_config_path(char* default_path, char* pbuf, size_t bufsize) {
char *path = default_path;
if(check_path(path))
return path;
if (!pbuf)
goto err;
// priority 1: env var PROXYCHAINS_CONF_FILE
path = getenv(PROXYCHAINS_CONF_FILE_ENV_VAR);
@ -45,6 +47,7 @@ char *get_config_path(char* default_path, char* pbuf, size_t bufsize) {
if(check_path(path))
return path;
err:
perror("couldnt find configuration file");
exit(1);
}