From: Jouni Malinen Date: Sun, 19 Aug 2012 18:17:26 +0000 (+0300) Subject: EAP-SIM DB: Fix a memory leak on DB connection re-opening X-Git-Tag: hostap_2_0~362 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c13f0a3e000447cacc7fd13f4863b26bdcfa697f;p=thirdparty%2Fhostap.git EAP-SIM DB: Fix a memory leak on DB connection re-opening Signed-hostap: Jouni Malinen --- diff --git a/src/eap_server/eap_sim_db.c b/src/eap_server/eap_sim_db.c index 611e89b34..68fb1f0a6 100644 --- a/src/eap_server/eap_sim_db.c +++ b/src/eap_server/eap_sim_db.c @@ -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)");