From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id B078C4B052 for ; Sun, 26 May 2024 23:54:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6F57668D4FD; Mon, 27 May 2024 02:52:52 +0300 (EEST) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A057B68D560 for ; Mon, 27 May 2024 02:52:38 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 02A2BE0003 for ; Sun, 26 May 2024 23:52:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1716767558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C8WfrN4t85X9q39oZzdoAJine5Th0U7ukZV9c43y6D8=; b=bjfFM88EYYwyzA0iw2Oa/mDa9KrZ0SZSSsyR4BOwj6PBVSh3VJIDK/yI9G77u9UYdbuCV7 zB21GghR7aWFXVBeq6xuUw21o6W61Om96GtYH9XAkw+5gIAuRq6n9kd2eOcvAgkyWjJoLW 6l8u8/1y5Cg6i4kYFiixlUUdvsVqFTgVGKck6xTXjHTrsfovWdt+fzMxOq2xFwIWa9lGap BF+Ynp2xNpv+ZiPppYauL3RWO5bO/DogreEmmF0SALtHMhDhXrXQLt+Zo2GO2jJkzuu4bi PU3pc0gFklR7OZCDBAjFhhHMR1+z4UkebULHLjX14bGkbRb05e6A0asRX56T7Q== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 27 May 2024 01:52:20 +0200 Message-ID: <20240526235230.2876318-8-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240526235230.2876318-1-michael@niedermayer.cc> References: <20240526235230.2876318-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 08/17] avcodec/vp8: Check mutex init X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Fixes: CID1598556 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/vp8.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 8e91613068a..3e1f67172ae 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -247,7 +247,11 @@ int update_dimensions(VP8Context *s, int width, int height, int is_vp7) return AVERROR(ENOMEM); } #if HAVE_THREADS - pthread_mutex_init(&s->thread_data[i].lock, NULL); + ret = pthread_mutex_init(&s->thread_data[i].lock, NULL); + if (ret) { + free_buffers(s); + return AVERROR(ret); + } pthread_cond_init(&s->thread_data[i].cond, NULL); #endif } -- 2.45.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".