Fix use after free in error message
This commit is contained in:
parent
f55caaf6a0
commit
937ba3c7e7
1 changed files with 3 additions and 2 deletions
|
@ -652,10 +652,9 @@ RrImage* RrImageNewFromName(RrImageCache *cache, const gchar *name)
|
|||
}
|
||||
#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
|
||||
|
@ -665,6 +664,8 @@ RrImage* RrImageNewFromName(RrImageCache *cache, const gchar *name)
|
|||
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
|
||||
cache.
|
||||
|
|
Loading…
Reference in a new issue