all repos — openbox @ 937ba3c7e791111bd94153866545dd9bb8334c7f

openbox fork - make it a bit more like ryudo

Fix use after free in error message
Mikael Magnusson mikachu@gmail.com
commit

937ba3c7e791111bd94153866545dd9bb8334c7f

parent

f55caaf6a003c8e9dece297e0e1aca89a1ee99ef

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M obrender/image.cobrender/image.c

@@ -652,10 +652,9 @@ loaded = !!imlib_loader;

} #endif - g_free(path); - if (!loaded) { g_message("Cannot load image \"%s\" from file \"%s\"", name, path); + g_free(path); #if defined(USE_LIBRSVG) DestroyRsvgLoader(rsvg_loader); #endif

@@ -664,6 +663,8 @@ DestroyImlibLoader(imlib_loader);

#endif return NULL; } + + g_free(path); /* get an RrImage that contains an RrImageSet with this picture in it. the RrImage might be new, or reused if the picture was already in the