fix double-free, and make the builtins non-static to save relocations
2007-08-17 Jens Granseuer <jensgr@gmx.net> * gnome-theme-info.c: (read_cursor_fonts): fix double-free, and make the builtins non-static to save relocations svn path=/trunk/; revision=8013
This commit is contained in:
parent
cbbba2a4b1
commit
2f48b99c2a
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-08-17 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* gnome-theme-info.c: (read_cursor_fonts): fix double-free, and make
|
||||
the builtins non-static to save relocations
|
||||
|
||||
2007-08-17 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* gnome-theme-info.c: (read_cursor_fonts): don't leak the cursor font
|
||||
|
|
|
@ -1799,7 +1799,7 @@ read_cursor_fonts (void)
|
|||
gchar *cursor_font;
|
||||
gint i;
|
||||
|
||||
static const gchar* builtins[][4] = {
|
||||
const gchar *builtins[][4] = {
|
||||
{
|
||||
"gnome/cursor-fonts/cursor-normal.pcf",
|
||||
N_("Default Pointer"),
|
||||
|
@ -1833,13 +1833,13 @@ read_cursor_fonts (void)
|
|||
gchar *filename;
|
||||
|
||||
theme_info = gnome_theme_cursor_info_new ();
|
||||
theme_info->priority = 0;
|
||||
|
||||
filename = g_build_filename (GNOMECC_DATA_DIR "/pixmaps", builtins[i][3], NULL);
|
||||
theme_info->thumbnail = gdk_pixbuf_new_from_file (filename, NULL);
|
||||
g_free (filename);
|
||||
|
||||
theme_info->name = theme_info->path = g_build_filename (GNOMECC_DATA_DIR, builtins[i][0], NULL);
|
||||
theme_info->name = g_build_filename (GNOMECC_DATA_DIR, builtins[i][0], NULL);
|
||||
theme_info->path = g_strdup (theme_info->name);
|
||||
|
||||
if (!strcmp (theme_info->path, cursor_font))
|
||||
theme_info->readable_name = g_strdup (builtins[i][2]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue