mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-07 00:31:11 +00:00
device/wifi: fix memleak parsing SSID arguments for "RequestScan"
Oddly enough, valgrind was not complaining about this leak...
Fixes: 87b2d783b6
('core: accept 'ssids':aay option in RequestScan() dictionary parameter')
This commit is contained in:
parent
6da9e06508
commit
5ed1edc02a
|
@ -1075,7 +1075,6 @@ static GPtrArray *
|
|||
ssids_options_to_ptrarray (GVariant *value, GError **error)
|
||||
{
|
||||
GPtrArray *ssids = NULL;
|
||||
GVariant *v;
|
||||
const guint8 *bytes;
|
||||
gsize len;
|
||||
int num_ssids, i;
|
||||
|
@ -1092,6 +1091,8 @@ ssids_options_to_ptrarray (GVariant *value, GError **error)
|
|||
if (num_ssids) {
|
||||
ssids = g_ptr_array_new_full (num_ssids, (GDestroyNotify) g_bytes_unref);
|
||||
for (i = 0; i < num_ssids; i++) {
|
||||
gs_unref_variant GVariant *v = NULL;
|
||||
|
||||
v = g_variant_get_child_value (value, i);
|
||||
bytes = g_variant_get_fixed_array (v, &len, sizeof (guint8));
|
||||
if (len > 32) {
|
||||
|
|
Loading…
Reference in a new issue