Commit 5d1c8ad1 authored by Jouni Malinen's avatar Jouni Malinen Committed by Dmitry Shmidt
Browse files

wpa_supplicant: fix memory leak in -I option handling


Change-Id: I1b393d245d606882e7bb548135d1eab99a988a81
Signed-off-by: default avatarDmitry Shmidt <dimitrysh@google.com>
parent 97d98069
......@@ -912,7 +912,7 @@ int wpa_config_process_global(struct wpa_config *config, char *pos, int line);
* wpa_config_read - Read and parse configuration database
* @name: Name of the configuration (e.g., path and file name for the
* configuration file)
* @cfgp: Pointer to previousely allocated configuration data
* @cfgp: Pointer to previously allocated configuration data or %NULL if none
* Returns: Pointer to allocated configuration data or %NULL on failure
*
* This function reads configuration data, parses its contents, and allocates
......
......@@ -32,7 +32,8 @@ static void usage(void)
" [-o<override driver>] [-O<override ctrl>] \\\n"
" [-N -i<ifname> -c<conf> [-C<ctrl>] "
"[-D<driver>] \\\n"
" [-p<driver_param>] [-b<br_ifname>] [-I<config file>]\n"
" [-p<driver_param>] [-b<br_ifname>] [-I<config file>] "
"...]\n"
"\n"
"drivers:\n",
wpa_supplicant_version, wpa_supplicant_license);
......@@ -50,7 +51,7 @@ static void usage(void)
" -c = Configuration file\n"
" -C = ctrl_interface parameter (only used if -c is not)\n"
" -i = interface name\n"
" -I = additional Configuration file\n"
" -I = additional configuration file\n"
" -d = increase debugging verbosity (-dd even more)\n"
" -D = driver name (can be multiple drivers: nl80211,wext)\n"
" -e = entropy file\n");
......
......@@ -399,6 +399,9 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
os_free(wpa_s->confname);
wpa_s->confname = NULL;
os_free(wpa_s->confanother);
wpa_s->confanother = NULL;
wpa_sm_set_eapol(wpa_s->wpa, NULL);
eapol_sm_deinit(wpa_s->eapol);
wpa_s->eapol = NULL;
......
......@@ -56,9 +56,10 @@ struct wpa_interface {
const char *confname;
/**
* confanother - Additional Configuration name (file or profile) name
* confanother - Additional configuration name (file or profile) name
*
* This can also be %NULL when a configuration file is not used.
* This can also be %NULL when the additional configuration file is not
* used.
*/
const char *confanother;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment