summaryrefslogtreecommitdiff
path: root/libavdevice/dshow_pin.c
diff options
context:
space:
mode:
authorOliver Collyer <ovcollyer@mac.com>2019-01-03 07:41:12 +0000
committerJames Almer <jamrial@gmail.com>2019-01-03 13:15:45 -0300
commitbf96937a961baeef75236ad0b986a1bb17906143 (patch)
tree1599b57f81d7e6adb9a225f0a2c72cfccfae109f /libavdevice/dshow_pin.c
parent5402c1886b97a0c46e843b5ae0c08de74d2e6091 (diff)
avdevice/dshow: Fixed some minor memory leaks
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavdevice/dshow_pin.c')
-rw-r--r--libavdevice/dshow_pin.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/libavdevice/dshow_pin.c b/libavdevice/dshow_pin.c
index 664246da92..53b1c9150d 100644
--- a/libavdevice/dshow_pin.c
+++ b/libavdevice/dshow_pin.c
@@ -249,8 +249,20 @@ libAVPin_Setup(libAVPin *this, libAVFilter *filter)
return 1;
}
+
+static void
+libAVPin_Free(libAVPin *this)
+{
+ if (!this)
+ return;
+ av_freep(&this->imemvtbl);
+ if (this->type.pbFormat) {
+ CoTaskMemFree(this->type.pbFormat);
+ this->type.pbFormat = NULL;
+ }
+}
DECLARE_CREATE(libAVPin, libAVPin_Setup(this, filter), libAVFilter *filter)
-DECLARE_DESTROY(libAVPin, nothing)
+DECLARE_DESTROY(libAVPin, libAVPin_Free)
/*****************************************************************************
* libAVMemInputPin