mirror of https://github.com/GNOME/gimp.git
app: get rid of a wrong return-after-free report.
Reported by Massimo, though this one is wrong, as far as I can see. `ninja scan-build` apparently reports `result` as being returned after being freed here. But actually since we are setting the `error` with g_set_error() in the same time we free `result`, we would also enter the `if (*error)` block a few lines later, which would return NULL and not `result` anyway. I guess the static analyzer could not see that far. Still, set the pointer to NULL with g_clear_pointer(), which should be enough to make the static analyzer happy.
This commit is contained in:
parent
22f234e5b0
commit
fd9f96f174
|
@ -655,7 +655,7 @@ gimp_prop_eval_string_impl (GObject *config,
|
|||
g_set_error (error, GIMP_PROP_EVAL_ERROR, GIMP_PROP_EVAL_FAILED,
|
||||
"invalid expression");
|
||||
|
||||
g_free (result);
|
||||
g_clear_pointer (&result, g_free);
|
||||
}
|
||||
|
||||
g_free (t);
|
||||
|
|
Loading…
Reference in New Issue