summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-03-14 16:51:13 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-03-14 16:51:13 +0100
commit25154b62452926c5f558fc5f662168ddbdcd4422 (patch)
tree84d66817fbfac001cdedb6a0246c5c74acb3ed5e
parentfaea9fed916712f0bc1bae0ba405d4d99ac4f401 (diff)
downloadvdr-25154b62452926c5f558fc5f662168ddbdcd4422.tar.gz
vdr-25154b62452926c5f558fc5f662168ddbdcd4422.tar.bz2
Fixed a memory leak in thread handling when using NPTL
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY4
-rw-r--r--config.h6
-rw-r--r--thread.c3
4 files changed, 10 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 1f722319..fe90018b 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -797,6 +797,7 @@ Karim Afifi <karim.afifi@free.fr>
Jon Burgess <mplayer@jburgess.uklinux.net>
for pointing out a problem with NPTL ("Native Posix Thread Library")
for changing thread handling to make it work with NPTL ("Native Posix Thread Library")
+ for fixing a memory leak in thread handling when using NPTL
Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
for reporting a crash when cancelling a newly created timer
diff --git a/HISTORY b/HISTORY
index 6bd77457..f6206187 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2745,3 +2745,7 @@ Video Disk Recorder Revision History
events to timers.
- Now explicitly turning on the LNB power at startup, because newer drivers don't
do this any more (thanks to Oliver Endriss for pointing this out).
+
+2004-03-14: Version 1.3.7
+
+- Fixed a memory leak in thread handling when using NPTL (thanks to Jon Burgess).
diff --git a/config.h b/config.h
index d2afdeea..fdccd417 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 1.190 2004/03/05 14:35:15 kls Exp $
+ * $Id: config.h 1.191 2004/03/14 16:51:13 kls Exp $
*/
#ifndef __CONFIG_H
@@ -20,8 +20,8 @@
#include "i18n.h"
#include "tools.h"
-#define VDRVERSION "1.3.6"
-#define VDRVERSNUM 10306 // Version * 10000 + Major * 100 + Minor
+#define VDRVERSION "1.3.7"
+#define VDRVERSNUM 10307 // Version * 10000 + Major * 100 + Minor
#define MAXPRIORITY 99
#define MAXLIFETIME 99
diff --git a/thread.c b/thread.c
index 974362c9..084a4295 100644
--- a/thread.c
+++ b/thread.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: thread.c 1.30 2004/01/03 16:59:33 kls Exp $
+ * $Id: thread.c 1.31 2004/03/14 16:48:30 kls Exp $
*/
#include "thread.h"
@@ -199,6 +199,7 @@ bool cThread::Start(void)
running = true;
parentTid = pthread_self();
pthread_create(&childTid, NULL, (void *(*) (void *))&StartThread, (void *)this);
+ pthread_detach(childTid); // auto-reap
pthread_setschedparam(childTid, SCHED_RR, 0);
usleep(10000); // otherwise calling Active() immediately after Start() causes a "pure virtual method called" error
}