mirror of https://git.48k.eu/ogserver
#990 Fix og_cmd_wol memory leak
Allocated strings using dbi_result_get_string_copy are not being freed
after using them. This patch fix this memory leak.
Fixes: e4cb91b
("#990 wol: migrate mac and netmask query to ogServer")
master
parent
3b3405bc2f
commit
a46b69b590
|
@ -493,6 +493,12 @@ static int og_cmd_wol(json_t *element, struct og_msg_params *params)
|
||||||
(char *)params->wol_type))
|
(char *)params->wol_type))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
for (i = 0; i < params->ips_array_len; ++i) {
|
||||||
|
free((void *)params->ips_array[i]);
|
||||||
|
free((void *)params->mac_array[i]);
|
||||||
|
free((void *)params->netmask_array[i]);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue