libgimpwidgets: free leaked GError.

Thanks to Massimo for reporting.
This commit is contained in:
Jehan 2021-08-22 12:22:50 +02:00
parent 38a0b7611c
commit dd38b88cc2
2 changed files with 3 additions and 2 deletions

View file

@ -162,7 +162,7 @@ static void gimp_eevl_error (GimpEevl
* @result: Result of evaluation. * @result: Result of evaluation.
* @error_pos: Will point to the position within the string, * @error_pos: Will point to the position within the string,
* before which the parse / evaluation error * before which the parse / evaluation error
* occurred. Will be set to null of no error occurred. * occurred. Will be set to null if no error occurred.
* @error_message: Will point to a static string with a semi-descriptive * @error_message: Will point to a static string with a semi-descriptive
* error message if parsing / evaluation failed. * error message if parsing / evaluation failed.
* *

View file

@ -1366,7 +1366,7 @@ gimp_size_entry_eevl_input_callback (GtkSpinButton *spinner,
GimpSizeEntryPrivate *priv = GET_PRIVATE (gsef->gse); GimpSizeEntryPrivate *priv = GET_PRIVATE (gsef->gse);
GimpEevlOptions options = GIMP_EEVL_OPTIONS_INIT; GimpEevlOptions options = GIMP_EEVL_OPTIONS_INIT;
gboolean success = FALSE; gboolean success = FALSE;
const gchar *error_pos = 0; const gchar *error_pos = NULL;
GError *error = NULL; GError *error = NULL;
GimpEevlQuantity result; GimpEevlQuantity result;
@ -1424,6 +1424,7 @@ gimp_size_entry_eevl_input_callback (GtkSpinButton *spinner,
{ {
g_printerr ("ERROR: Expression evaluation failed without error.\n"); g_printerr ("ERROR: Expression evaluation failed without error.\n");
} }
g_clear_error (&error);
gtk_widget_error_bell (GTK_WIDGET (spinner)); gtk_widget_error_bell (GTK_WIDGET (spinner));
return GTK_INPUT_ERROR; return GTK_INPUT_ERROR;