steelseries: fix bug where we were wrongly dellocating dpi_{range,list}

_cleanup_ is deallocating the pointer returned by
ratbag_device_data_steelseries_get_dpi_{range,list}(). Deallocating
dpi_list results in a wrong step value, and a wrong step value then
results in a wrong step count when we try to set the dpi.

Fixes #436 and #702
This commit is contained in:
FFY00
2019-05-26 15:46:36 +01:00
committed by Filipe Laíns
parent dbe98ed5b9
commit a13ee32c61

View File

@@ -271,8 +271,8 @@ steelseries_probe(struct ratbag_device *device)
struct ratbag_button *button;
struct ratbag_led *led;
int rc, button_count, led_count, device_version, mono_led, short_button;
_cleanup_(dpi_list_freep) struct dpi_list *dpilist = NULL;
_cleanup_(freep) struct dpi_range *dpirange = NULL;
struct dpi_list *dpilist = NULL;
struct dpi_range *dpirange = NULL;
unsigned int report_rates[] = { 125, 250, 500, 1000 };