libgimpbase: GError set twice in gimpreloc.c
This patch fixes a double free error due to a pointer being freed and then not nulled out. It appears this is corrupting memory on MacOS as the `/proc` file system is not available and therefore multiple errors are returned. Fixes: (process:54873): GLib-WARNING **: 23:09:25.976: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: Error opening file /proc/self/maps: No such file or directory _br_find_exe: (NULL)gimp-console(54873,0x100957e00) malloc: *** error for object 0x103f09e80: pointer being freed was not allocated gimp-console(54873,0x100957e00) malloc: *** set a breakpoint in malloc_error_break to debug
This commit is contained in:
parent
d33c45fb47
commit
f87ec4bcfe
1 changed files with 2 additions and 2 deletions
|
|
@ -73,7 +73,7 @@ _br_find_exe (GimpBinrelocInitError *error)
|
|||
* an alternate method.
|
||||
*/
|
||||
g_printerr ("%s: %s\n", G_STRFUNC, gerror->message);
|
||||
g_error_free (gerror);
|
||||
g_clear_error (&gerror);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -107,7 +107,7 @@ _br_find_exe (GimpBinrelocInitError *error)
|
|||
if (! input)
|
||||
{
|
||||
g_printerr ("%s: %s", G_STRFUNC, gerror->message);
|
||||
g_error_free (gerror);
|
||||
g_clear_error (&gerror);
|
||||
|
||||
if (error)
|
||||
*error = GIMP_RELOC_INIT_ERROR_OPEN_MAPS;
|
||||
|
|
|
|||
Loading…
Reference in a new issue