mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Free dir pointer
This commit is contained in:
parent
63a1432652
commit
1271a50eaf
3 changed files with 3 additions and 33 deletions
BIN
files/main
BIN
files/main
Binary file not shown.
33
files/main.c
33
files/main.c
|
@ -1,33 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libconfig.h>
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
config_t cfg;
|
||||
config_setting_t *root, *setting, *movie;
|
||||
|
||||
config_init(&cfg);
|
||||
|
||||
/* Read the file. If there is an error, report it and exit. */
|
||||
if(! config_read_file(&cfg, "dawn.config"))
|
||||
{
|
||||
fprintf(stderr, "%s:%d - %s\n", config_error_file(&cfg),
|
||||
config_error_line(&cfg), config_error_text(&cfg));
|
||||
config_destroy(&cfg);
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
printf("READ CONFIG!!!\n");
|
||||
|
||||
root = config_root_setting(&cfg);
|
||||
|
||||
int ht_support;
|
||||
if (config_lookup_int(&cfg, "ht_support", &ht_support))
|
||||
printf("Broadcast Port: %d\n\n", ht_support);
|
||||
else
|
||||
fprintf(stderr, "No 'name' setting in configuration file.\n");
|
||||
|
||||
|
||||
}
|
|
@ -252,6 +252,7 @@ static int subscribe_to_hostapd_interfaces(char *hostapd_dir) {
|
|||
add_subscriber(subscribe_name);
|
||||
}
|
||||
}
|
||||
closedir(dirp);
|
||||
// free(hostapd_dir); // free string
|
||||
return 0;
|
||||
}
|
||||
|
@ -431,6 +432,7 @@ static int ubus_get_clients() {
|
|||
}
|
||||
}
|
||||
}
|
||||
closedir(dirp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -505,6 +507,7 @@ void del_client_all_interfaces(const uint8_t *client_addr, uint32_t reason, uint
|
|||
}
|
||||
}
|
||||
}
|
||||
closedir(dirp);
|
||||
}
|
||||
|
||||
void del_client_interface(uint32_t id, const uint8_t *client_addr, uint32_t reason, uint8_t deauth, uint32_t ban_time) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue