h264: fix memleak on error during SPS parsing
authorJanne Grunau <janne-libav@jannau.net>
Fri, 14 Dec 2012 20:08:24 +0000 (21:08 +0100)
committerJanne Grunau <janne-libav@jannau.net>
Sat, 15 Dec 2012 18:16:39 +0000 (19:16 +0100)
Introduced in d7d6efe42b0d.

libavcodec/h264_ps.c

index 0166ad2..7eb8726 100644 (file)
@@ -357,7 +357,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
         av_log(h->s.avctx, AV_LOG_ERROR,
                "log2_max_frame_num_minus4 out of range (0-12): %d\n",
                log2_max_frame_num_minus4);
-        return AVERROR_INVALIDDATA;
+        goto fail;
     }
     sps->log2_max_frame_num = log2_max_frame_num_minus4 + 4;