Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@ltnglobal.com>2017-09-26 19:06:20 +0300
committerMarton Balint <cus@passwd.hu>2017-10-04 23:48:23 +0300
commitb6782a192e18161f33fc5e943b6f33dcb97e7287 (patch)
tree57f77f85d716473623b80e6dd7ef8e184857949b /libavdevice/decklink_common.cpp
parent3dc01223ef5248ec559e439fb22c38721151c894 (diff)
avdevice/decklink: Fix segfault when running -list_devices on OSX
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 <dheitmueller@ltnglobal.com> Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavdevice/decklink_common.cpp')
-rw-r--r--libavdevice/decklink_common.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index ff2df95909..c782171f2c 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 *