Maarten Lankhorst : winegstreamer: Fix buffer leak in error path.
Alexandre Julliard
julliard at winehq.org
Wed Nov 10 11:09:38 CST 2010
Module: wine
Branch: master
Commit: d62b4dcb664a2a6a8579600c975e8213766746f7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d62b4dcb664a2a6a8579600c975e8213766746f7
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Tue Nov 9 23:42:44 2010 +0100
winegstreamer: Fix buffer leak in error path.
---
dlls/winegstreamer/gstdemux.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index d26f853..a6f72c4 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -517,10 +517,12 @@ static GstFlowReturn got_data_sink(GstPad *pad, GstBuffer *buf) {
} else {
BYTE *ptr = NULL;
hr = BaseOutputPinImpl_GetDeliveryBuffer(&pin->pin, &sample, NULL, NULL, 0);
- freeSamp = TRUE;
- if (hr == VFW_E_NOT_CONNECTED)
+ if (hr == VFW_E_NOT_CONNECTED) {
+ gst_buffer_unref(buf);
return GST_FLOW_NOT_LINKED;
+ }
if (FAILED(hr)) {
+ gst_buffer_unref(buf);
ERR("Didn't get a GST_APP_BUFFER, and could not get a delivery buffer (%x), returning GST_FLOW_WRONG_STATE\n", hr);
return GST_FLOW_WRONG_STATE;
}
More information about the wine-cvs
mailing list