]> git.sesse.net Git - mlt/commitdiff
fix memory leak (coverity-710863)
authorDan Dennedy <dan@dennedy.org>
Mon, 23 Jul 2012 01:37:28 +0000 (18:37 -0700)
committerDan Dennedy <dan@dennedy.org>
Mon, 23 Jul 2012 01:37:28 +0000 (18:37 -0700)
src/modules/gtk2/filter_rescale.c

index e7b574cadd51e0f51cad6b82a3e56bfd532f3d6e..81891d88307b55aae1b1a1bd0b08708fc2a01219 100644 (file)
@@ -75,11 +75,10 @@ static int filter_scale( mlt_frame this, uint8_t **image, mlt_image_format *form
        case mlt_image_rgb24a:
        case mlt_image_opengl:
        {
-               // Create the output image
-               uint8_t *output = mlt_pool_alloc( size );
-
                if ( strcmp( interps, "none" ) && ( iwidth != owidth || iheight != oheight ) )
                {
+                       // Create the output image
+                       uint8_t *output = mlt_pool_alloc( size );
                        GdkPixbuf *pixbuf = gdk_pixbuf_new_from_data( *image, GDK_COLORSPACE_RGB,
                                ( *format == mlt_image_rgb24a || *format == mlt_image_opengl ), 8, iwidth, iheight,
                                iwidth * bpp, NULL, NULL );