diff mbox

[FFmpeg-devel,2/2] avformat/mpegtsenc: Remove redundant goto after malloc fail

Message ID 20190731223756.3970-2-andriy.gelman@gmail.com
State Withdrawn
Headers show

Commit Message

Andriy Gelman July 31, 2019, 10:37 p.m. UTC
From: Andriy Gelman <andriy.gelman@gmail.com>

---
 libavformat/mpegtsenc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index fc0ea225c6..1541a7a073 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -846,10 +846,8 @@  static int mpegts_init(AVFormatContext *s)
     ts->sdt.opaque       = s;
 
     pids = av_malloc_array(s->nb_streams, sizeof(*pids));
-    if (!pids) {
-        ret = AVERROR(ENOMEM);
-        goto fail;
-    }
+    if (!pids) 
+        return AVERROR(ENOMEM);
 
     /* assign pids to each stream */
     for (i = 0; i < s->nb_streams; i++) {