From patchwork Tue Sep 26 16:06:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devin Heitmueller X-Patchwork-Id: 5294 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.36.26 with SMTP id f26csp4001958jaa; Tue, 26 Sep 2017 09:06:56 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCfgDcPEQ8GDYCYXH0SaVM/hEheM2y7R8wuhmY/DYCfytSM4tWslrqohyykLymmGZytq+gT X-Received: by 10.223.133.147 with SMTP id 19mr8890839wrt.184.1506442016267; Tue, 26 Sep 2017 09:06:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506442016; cv=none; d=google.com; s=arc-20160816; b=rvd2m+sbhMysZCTE4kaZVUlYeQxQyZTi7HapcmdYx26GFs0DqzFOBJjPawdGRFvml+ 92EfmQNfMABZhy/SKi2mjI+o7/n48oJm+gGDDAkBcc1mJD87P2gAr0comQuaDA8ojfwV FzjKVdM7KfI3CG/l7Bxtzmq8EgHXchZOVQwUYNkI559kHTPz10SgZBQmHz47K0jev+LE kcEPF+GoRzycTGPwN73Xgr2c2zZaqq6JF0XDEaIHHPiK9Xlb3jpIsO2OAjPoCbngK+Lr NV3PfYs1p+HjYgS2dMWZs5VmmnC7DXePRkysMM/OqG4oCsvWkXUrU/xeesRJATsoZjcg 8oQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=Ql5AbzWiBtQUfAWLRoH2i+h0VkU7kjDrTVngcNo00l8=; b=j3wq3T/RvZw0XeiIvXWwxA0wEawNQ6pbip2H7UxK0ekB91pLBHK6AzvBO1DGCSXG4c nUgsi2dapxAFjAOd3mZjKwDCcPJx1FhlxYb7sqewHaUY62ue8/D/Z0CbdZhU13MwvC3T 09B3nb7By7dqXILw5OV4LkogpIVddJBn6JMDgLAPNqgF4DEhQhMkTMIm0ZFboP7VqOD/ EKOATd8sbgjUgcSVw6p8yNth1Of1uSVcja/4ySiGEWV3SP5Pjfzbv57eldU83qYIa1+7 4rmE9qWePY7hYMiypUmCqszneVjJsrCo1MiR0cNoA2RwNZaNubUGPOzUW0oR+c8F1il8 Q/oA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q1si7693306wrb.233.2017.09.26.09.06.55; Tue, 26 Sep 2017 09:06:56 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C514F68830D; Tue, 26 Sep 2017 19:06:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from was-smtp1.livetimenet.net (50-206-97-56-static.hfc.comcastbusiness.net [50.206.97.56]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 75001680507 for ; Tue, 26 Sep 2017 19:06:31 +0300 (EEST) Received: by was-smtp1.livetimenet.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.84_2) (envelope-from ) id 1dwsNe-00055P-1X; Tue, 26 Sep 2017 12:06:42 -0400 From: Devin Heitmueller To: ffmpeg-devel@ffmpeg.org Date: Tue, 26 Sep 2017 12:06:20 -0400 Message-Id: <20170926160623.1257-2-dheitmueller@ltnglobal.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170926160623.1257-1-dheitmueller@ltnglobal.com> References: <20170926160623.1257-1-dheitmueller@ltnglobal.com> X-Spam-Score: -1.9 (-) Subject: [FFmpeg-devel] [PATCH 1/4] avdevice/decklink: Fix segfault when running -list_devices on OSX X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Cc: Devin Heitmueller MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The string is allocated with CFStringGetCString but was being deallocated with free(), which would intermittently result in a segmentation fault. Use the correct function for freeing the allocated CFString. Signed-off-by: Devin Heitmueller --- libavdevice/decklink_common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index cbb591ce64..7745575d0e 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -84,7 +84,7 @@ static char *dup_cfstring_to_utf8(CFStringRef w) } #define DECKLINK_STR const __CFString * #define DECKLINK_STRDUP dup_cfstring_to_utf8 -#define DECKLINK_FREE(s) free((void *) s) +#define DECKLINK_FREE(s) CFRelease(s) #define DECKLINK_BOOL bool #else #define DECKLINK_STR const char *