EAP-SIM DB: Fix a memory leak on DB connection re-opening
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
704b8762a2
commit
c13f0a3e00
1 changed files with 1 additions and 0 deletions
|
@ -340,6 +340,7 @@ static int eap_sim_db_open_socket(struct eap_sim_db_data *data)
|
|||
addr.sun_family = AF_UNIX;
|
||||
os_snprintf(addr.sun_path, sizeof(addr.sun_path),
|
||||
"/tmp/eap_sim_db_%d-%d", getpid(), counter++);
|
||||
os_free(data->local_sock);
|
||||
data->local_sock = os_strdup(addr.sun_path);
|
||||
if (bind(data->sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
|
||||
perror("bind(eap_sim_db)");
|
||||
|
|
Loading…
Reference in a new issue