decklink: Free SDK strings after usage on Linux
authorSebastian Dröge <sebastian@centricular.com>
Tue, 30 May 2023 10:23:28 +0000 (13:23 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 7 Jun 2023 05:46:12 +0000 (05:46 +0000)
While they're const char* they still need to be freed like on Windows
and macOS and would be leaked otherwise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4786>

subprojects/gst-plugins-bad/sys/decklink/gstdecklink.h

index 13f76cb..5481c7d 100644 (file)
@@ -63,7 +63,8 @@
 #define COMSTR_T const char*
 #define CONVERT_COM_STRING(s)
 #define CONVERT_TO_COM_STRING(s)
-#define FREE_COM_STRING(s)
+/* While this is a const char*, the string still has to be freed */
+#define FREE_COM_STRING(s) free(s);
 #define WINAPI
 #endif /* G_OS_WIN32 */