From: Helge Norberg Date: Tue, 8 Nov 2016 15:48:48 +0000 (+0100) Subject: [decklink_consumer] Fixed potential read from unallocated memory X-Git-Tag: 2.1.0_Beta1~19 X-Git-Url: https://git.sesse.net/?p=casparcg;a=commitdiff_plain;h=db7c036ecbc5ce0a2afdd982c1ec17635af067a0 [decklink_consumer] Fixed potential read from unallocated memory --- diff --git a/modules/decklink/consumer/decklink_consumer.cpp b/modules/decklink/consumer/decklink_consumer.cpp index d4da7d9da..2d7af477b 100644 --- a/modules/decklink/consumer/decklink_consumer.cpp +++ b/modules/decklink/consumer/decklink_consumer.cpp @@ -219,7 +219,12 @@ public: virtual ULONG STDMETHODCALLTYPE Release() { if(--ref_count_ == 0) + { delete this; + + return 0; + } + return ref_count_; }