]> git.sesse.net Git - casparcg/blobdiff - modules/decklink/consumer/decklink_consumer.cpp
[decklink_consumer] Fixed potential read from unallocated memory
[casparcg] / modules / decklink / consumer / decklink_consumer.cpp
index d4da7d9da3736430b9efc73d3c1dbbf1f19fc09e..2d7af477bf19abe8c930ffc777f59a557079e64b 100644 (file)
@@ -219,7 +219,12 @@ public:
        virtual ULONG STDMETHODCALLTYPE Release()
        {
                if(--ref_count_ == 0)
+               {
                        delete this;
+
+                       return 0;
+               }
+
                return ref_count_;
        }