commit | eecc4372addc9387dc086a0035672c43489a856e | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Mon Feb 05 20:28:17 2018 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Mon Feb 05 20:28:17 2018 +0000 |
tree | f9ec9902886809f3985c56a92d5a5dab2f4becc0 | |
parent | 18db0829f5c0e6b67f9593d166df5fc357c9d4eb [diff] | |
parent | e3d76d9c1d0848c7b57e73aed3c5a1aa3835139f [diff] |
Merge "wpa_supplicant: Free config only if it was allocated in same call"
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c index 6b7abe2..0d70850 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c
@@ -397,7 +397,8 @@ if (f == NULL) { wpa_printf(MSG_ERROR, "Failed to open config file '%s', " "error: %s", name, strerror(errno)); - os_free(config); + if (config != cfgp) + os_free(config); return NULL; }