parse_zones: Fix memory leak
authorHenrik Gramner <henrik@gramner.com>
Fri, 5 Feb 2016 17:45:47 +0000 (18:45 +0100)
committerHenrik Gramner <henrik@gramner.com>
Fri, 5 Feb 2016 17:48:13 +0000 (18:48 +0100)
encoder/ratecontrol.c

index 0c6913a..22eddb0 100644 (file)
@@ -1279,7 +1279,10 @@ static int parse_zones( x264_t *h )
             int i_tok = strcspn( p, "/" );
             p[i_tok] = 0;
             if( parse_zone( h, &h->param.rc.zones[i], p ) )
+            {
+                x264_free( psz_zones );
                 return -1;
+            }
             p += i_tok + 1;
         }
         x264_free( psz_zones );