This allows relative path to be used in the same way as was already
supported by wpa_supplicant.
int ret = 1;
size_t i;
int c, debug = 0, daemonize = 0;
- const char *pid_file = NULL;
+ char *pid_file = NULL;
for (;;) {
c = getopt(argc, argv, "BdhKP:tv");
wpa_debug_show_keys++;
break;
case 'P':
- pid_file = optarg;
+ os_free(pid_file);
+ pid_file = os_rel2abs_path(optarg);
break;
case 't':
wpa_debug_timestamp++;
ret = 0;
out:
+ os_free(pid_file);
/* Deinitialize all interfaces */
for (i = 0; i < interfaces.count; i++)
hostapd_interface_deinit(interfaces.iface[i]);