mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-26 17:00:32 +01:00
libnm: fix memleak in nm_device_wifi_request_scan_options_async() for floating options argument
Fixes:7691fe5753('libnm: add new functions allowing passing options to RequestScan() D-Bus call') (cherry picked from commit187003882e)
This commit is contained in:
parent
07ccbdd828
commit
c13cef1b58
1 changed files with 6 additions and 4 deletions
|
|
@ -415,10 +415,10 @@ request_scan_cb (GObject *source,
|
|||
|
||||
static void
|
||||
_device_wifi_request_scan_async (NMDeviceWifi *device,
|
||||
GVariant *options,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
GVariant *options,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (device);
|
||||
RequestScanInfo *info;
|
||||
|
|
@ -437,6 +437,8 @@ _device_wifi_request_scan_async (NMDeviceWifi *device,
|
|||
g_simple_async_result_set_op_res_gboolean (simple, TRUE);
|
||||
g_simple_async_result_complete_in_idle (simple);
|
||||
g_object_unref (simple);
|
||||
if (options)
|
||||
nm_g_variant_unref_floating (options);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue