mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-04 20:28:29 +02:00
sectionsd.cpp: Fix error 'heap-use-after-free' reported by AddressSanitizer
Origin commit data
------------------
Commit: e2f282ccc9
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-01-12 (Tue, 12 Jan 2016)
This commit is contained in:
@@ -114,6 +114,8 @@ class CSectionThread : public OpenThreads::Thread, public DMX
|
|||||||
int skipTime;
|
int skipTime;
|
||||||
bool sendToSleepNow;
|
bool sendToSleepNow;
|
||||||
|
|
||||||
|
std::string threadName;
|
||||||
|
|
||||||
/* should thread wait for time set before process loop */
|
/* should thread wait for time set before process loop */
|
||||||
bool wait_for_time;
|
bool wait_for_time;
|
||||||
/* time in seconds to sleep when requested, wait forever if 0 */
|
/* time in seconds to sleep when requested, wait forever if 0 */
|
||||||
|
@@ -1432,8 +1432,8 @@ void CTimeThread::run()
|
|||||||
time_t dvb_time = 0;
|
time_t dvb_time = 0;
|
||||||
bool retry = false; /* if time seems fishy, set to true and try again */
|
bool retry = false; /* if time seems fishy, set to true and try again */
|
||||||
xprintf("%s::run:: starting, pid %d (%lu)\n", name.c_str(), getpid(), pthread_self());
|
xprintf("%s::run:: starting, pid %d (%lu)\n", name.c_str(), getpid(), pthread_self());
|
||||||
const char *tn = ("sd:" + name).c_str();
|
threadName = "sd:" + name;
|
||||||
set_threadname(tn);
|
set_threadname(threadName.c_str());
|
||||||
addFilters();
|
addFilters();
|
||||||
DMX::start();
|
DMX::start();
|
||||||
|
|
||||||
@@ -1568,8 +1568,8 @@ int CSectionThread::Sleep()
|
|||||||
void CSectionThread::run()
|
void CSectionThread::run()
|
||||||
{
|
{
|
||||||
xprintf("%s::run:: starting, pid %d (%lu)\n", name.c_str(), getpid(), pthread_self());
|
xprintf("%s::run:: starting, pid %d (%lu)\n", name.c_str(), getpid(), pthread_self());
|
||||||
const char *tn = ("sd:" + name).c_str();
|
threadName = "sd:" + name;
|
||||||
set_threadname(tn);
|
set_threadname(threadName.c_str());
|
||||||
if (sections_debug)
|
if (sections_debug)
|
||||||
dump_sched_info(name);
|
dump_sched_info(name);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user