avfdeviceprovider: do not leak the properties

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3278>
This commit is contained in:
Ignacio Casal Quinteiro 2022-10-26 11:47:43 +02:00 committed by Tim-Philipp Müller
parent c865a2b9c3
commit 049737966d

View file

@ -76,11 +76,16 @@ gst_av_capture_device_get_props (AVCaptureDevice *device)
"avf.has_torch", G_TYPE_BOOLEAN, [device hasTorch],
NULL);
g_free (unique_id);
g_free (model_id);
#if !HAVE_IOS
char *manufacturer = g_strdup ([[device manufacturer] UTF8String]);
gst_structure_set (props,
"avf.manufacturer", G_TYPE_STRING, manufacturer,
NULL);
g_free (manufacturer);
#endif
return props;