Merge pull request #8361 from jandelgado/add_udptunnel_package
[feed/packages.git] / utils / telldus-core / patches / 120-fix_missing_var_conf.patch
1 Added a missing initialisation that under special circumstanses causes seg fault.
2 --- a/service/SettingsConfuse.cpp
3 +++ b/service/SettingsConfuse.cpp
4 @@ -435,6 +435,7 @@ bool readVarConfig(cfg_t **cfg) {
5
6 FILE *fp = fopen(VAR_CONFIG_FILE, "re"); // e for setting O_CLOEXEC on the file handle
7 if (!fp) {
8 + (*cfg) = 0;
9 Log::warning("Unable to open var config file, %s", VAR_CONFIG_FILE);
10 return false;
11 }