[SCM] kodi-pvr-vdr-vnsi/master: VNSIRecording: fix memory leak in Close()
tiber-guest at users.alioth.debian.org
tiber-guest at users.alioth.debian.org
Fri Nov 4 00:20:25 UTC 2016
The following commit has been merged in the master branch:
commit 5a27d6f4e76f1bac3ad855bc2eeefec5136157b3
Author: Max Kellermann <max at duempel.org>
Date: Mon Jul 4 14:56:43 2016 +0200
VNSIRecording: fix memory leak in Close()
If the socket object is still allocated, but is not connected, then it
will never be freed, because cVNSISession::Close() is never called.
diff --git a/src/VNSIRecording.cpp b/src/VNSIRecording.cpp
index ce9bfa6..1dc2f20 100644
--- a/src/VNSIRecording.cpp
+++ b/src/VNSIRecording.cpp
@@ -71,12 +71,13 @@ bool cVNSIRecording::OpenRecording(const PVR_RECORDING& recinfo)
void cVNSIRecording::Close()
{
- if(!IsOpen())
- return;
+ if(IsOpen())
+ {
+ cRequestPacket vrp;
+ vrp.init(VNSI_RECSTREAM_CLOSE);
+ ReadSuccess(&vrp);
+ }
- cRequestPacket vrp;
- vrp.init(VNSI_RECSTREAM_CLOSE);
- ReadSuccess(&vrp);
cVNSISession::Close();
}
--
kodi-pvr-vdr-vnsi packaging
More information about the pkg-multimedia-commits
mailing list