diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/jpeg-thumbnailer/jpeg-thumbnailer.c | 1 | ||||
-rw-r--r-- | plugins/xdg-cache/xdg-cache-cache.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/plugins/jpeg-thumbnailer/jpeg-thumbnailer.c b/plugins/jpeg-thumbnailer/jpeg-thumbnailer.c index 7c90aba..74061cb 100644 --- a/plugins/jpeg-thumbnailer/jpeg-thumbnailer.c +++ b/plugins/jpeg-thumbnailer/jpeg-thumbnailer.c @@ -324,6 +324,7 @@ tvtj_jpeg_load (const JOCTET *content, if (G_LIKELY (cinfo.num_components != 1)) { pixels = g_malloc (cinfo.output_width * cinfo.output_height * cinfo.num_components); + buffer = NULL; out_num_components = cinfo.num_components; lines[0] = pixels; } diff --git a/plugins/xdg-cache/xdg-cache-cache.c b/plugins/xdg-cache/xdg-cache-cache.c index 14fd33f..74583f2 100644 --- a/plugins/xdg-cache/xdg-cache-cache.c +++ b/plugins/xdg-cache/xdg-cache-cache.c @@ -665,8 +665,8 @@ xdg_cache_cache_read_thumbnail_info (const gchar *filename, png_structp png_ptr; png_infop info_ptr; png_textp text_ptr; - gboolean has_uri = FALSE; - gboolean has_mtime = FALSE; + gboolean has_uri; + gboolean has_mtime; FILE *png; gint num_text; gint i; @@ -716,7 +716,8 @@ xdg_cache_cache_read_thumbnail_info (const gchar *filename, if (png_get_text (png_ptr, info_ptr, &text_ptr, &num_text) > 0) { /* iterate over all text keys */ - for (i = 0; !(has_uri && has_mtime) && i < num_text; ++i) + for (i = 0, has_uri = FALSE, has_mtime = FALSE; + !(has_uri && has_mtime) && i < num_text; ++i) { if (!text_ptr[i].key) continue; |