]> Dogcows Code - chaz/tint2/commitdiff
fixed memory leak
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Sun, 20 Sep 2009 08:02:39 +0000 (08:02 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Sun, 20 Sep 2009 08:02:39 +0000 (08:02 +0000)
src/taskbar/task.c

index 500d7f555f5ff096ae96d1aff4baaf23fed7d2b0..b45c184c792923ec7788564ae7958a140d7ae1e1 100644 (file)
@@ -200,11 +200,10 @@ void get_icon (Task *tsk)
                for (i = 0; i < length; ++i)
                        icon_data[i] =  tmp_data[i];
                img = imlib_create_image_using_data (w, h, icon_data);
+               free(icon_data);
 #else
                img = imlib_create_image_using_data (w, h, (DATA32*)tmp_data);
 #endif
-               imlib_context_set_image(img);
-               imlib_image_set_has_alpha(1);
                XFree (data);
        }
        else {
@@ -233,6 +232,7 @@ void get_icon (Task *tsk)
 
        // transform icons
        imlib_context_set_image(img);
+       imlib_image_set_has_alpha(1);
        tsk->icon = imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), panel->g_task.icon_size1, panel->g_task.icon_size1);
        imlib_free_image();
 
This page took 0.01925 seconds and 4 git commands to generate.