wacom: Fix use after free
Causing random values in the calibration data.
This commit is contained in:
parent
8e1dd1ae5d
commit
297eb6cfbb
1 changed files with 1 additions and 1 deletions
|
@ -298,13 +298,13 @@ calibrate (CcWacomPage *page)
|
||||||
tmp = g_malloc (ncal * sizeof (GVariant*));
|
tmp = g_malloc (ncal * sizeof (GVariant*));
|
||||||
for (i = 0; i < ncal; i++)
|
for (i = 0; i < ncal; i++)
|
||||||
tmp[i] = g_variant_new_int32 (calibration[i]);
|
tmp[i] = g_variant_new_int32 (calibration[i]);
|
||||||
g_free (calibration);
|
|
||||||
|
|
||||||
array = g_variant_new_array (G_VARIANT_TYPE_INT32, tmp, 4);
|
array = g_variant_new_array (G_VARIANT_TYPE_INT32, tmp, 4);
|
||||||
g_settings_set_value (page->priv->wacom_settings, "area", array);
|
g_settings_set_value (page->priv->wacom_settings, "area", array);
|
||||||
g_free (tmp);
|
g_free (tmp);
|
||||||
|
|
||||||
run_calibration (page, old_calibration, calibration, monitor);
|
run_calibration (page, old_calibration, calibration, monitor);
|
||||||
|
g_free (calibration);
|
||||||
gtk_widget_set_sensitive (WID ("button-calibrate"), FALSE);
|
gtk_widget_set_sensitive (WID ("button-calibrate"), FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue