hlr_auc_gw: Fix CONFIG_WPA_TRACE=y build

Need to initialize tracing code and use correct free() wrapper.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2012-05-03 22:05:04 +03:00
parent f765701faf
commit 057a92ec5c

View file

@ -210,7 +210,7 @@ static int read_gsm_triplets(const char *fname)
gsm_db = g; gsm_db = g;
g = NULL; g = NULL;
} }
free(g); os_free(g);
fclose(f); fclose(f);
@ -360,7 +360,7 @@ static int read_milenage(const char *fname)
milenage_db = m; milenage_db = m;
m = NULL; m = NULL;
} }
free(m); os_free(m);
fclose(f); fclose(f);
@ -613,14 +613,14 @@ static void cleanup(void)
while (g) { while (g) {
gprev = g; gprev = g;
g = g->next; g = g->next;
free(gprev); os_free(gprev);
} }
m = milenage_db; m = milenage_db;
while (m) { while (m) {
prev = m; prev = m;
m = m->next; m = m->next;
free(prev); os_free(prev);
} }
close(serv_sock); close(serv_sock);
@ -661,6 +661,9 @@ int main(int argc, char *argv[])
char *milenage_file = NULL; char *milenage_file = NULL;
char *gsm_triplet_file = NULL; char *gsm_triplet_file = NULL;
if (os_program_init())
return -1;
socket_path = default_socket_path; socket_path = default_socket_path;
for (;;) { for (;;) {
@ -705,5 +708,7 @@ int main(int argc, char *argv[])
for (;;) for (;;)
process(serv_sock); process(serv_sock);
os_program_deinit();
return 0; return 0;
} }