projects
/
dana
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f55caaf
)
Fix use after free in error message
author
Mikael Magnusson
<mikachu@gmail.com>
Sun, 11 Aug 2013 10:02:30 +0000
(12:02 +0200)
committer
Mikael Magnusson
<mikachu@gmail.com>
Sun, 11 Aug 2013 10:04:13 +0000
(12:04 +0200)
obrender/image.c
patch
|
blob
|
history
diff --git
a/obrender/image.c
b/obrender/image.c
index
0164a8c
..
8ff9bf1
100644
(file)
--- a/
obrender/image.c
+++ b/
obrender/image.c
@@
-652,10
+652,9
@@
RrImage* RrImageNewFromName(RrImageCache *cache, const gchar *name)
}
#endif
}
#endif
- g_free(path);
-
if (!loaded) {
g_message("Cannot load image \"%s\" from file \"%s\"", name, 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
#if defined(USE_LIBRSVG)
DestroyRsvgLoader(rsvg_loader);
#endif
@@
-665,6
+664,8
@@
RrImage* RrImageNewFromName(RrImageCache *cache, const gchar *name)
return NULL;
}
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.
/* 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.