Skip to content

Commit f9f8282

Browse files
committed
fix memory leak from shared ptr
1 parent 7acf272 commit f9f8282

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/gstreamer/gstkvssink.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,10 @@ gst_kvs_sink_finalize(GObject *object) {
790790
if (data->kinesis_video_producer) {
791791
data->kinesis_video_producer.reset();
792792
}
793+
794+
// Reset the shared pointer to properly release the KvsSinkCustomData
795+
kvssink->data.reset();
796+
793797
G_OBJECT_CLASS (parent_class)->finalize(object);
794798
}
795799

@@ -1666,4 +1670,4 @@ GST_PLUGIN_DEFINE (
16661670
"Proprietary",
16671671
"GStreamer",
16681672
"http://gstreamer.net/"
1669-
)
1673+
)

0 commit comments

Comments
 (0)