device: fix leak in sriov_deactivate_cb()

On master this code was refactored and thereby the leak was
fixed. Instead of backporting that, do an original patch for
nm-1-24 to fix only the leak.

Fixes: 121c58f0c4 ('core: set number of SR-IOV VFs asynchronously')
This commit is contained in:
Thomas Haller 2020-08-28 12:58:12 +02:00
parent 6936a0613c
commit a28d4a305a
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -15664,10 +15664,11 @@ sriov_deactivate_cb (GError *error, gpointer user_data)
NMDevice *self;
gpointer reason;
nm_utils_user_data_unpack (user_data, &self, &reason);
if (nm_utils_error_is_cancelled_or_disposing (error))
return;
nm_utils_user_data_unpack (user_data, &self, &reason);
deactivate_ready (self, (NMDeviceStateReason) reason);
}