Skip to content

Commit

Permalink
Clean up some small memory leaks in logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Beirdo committed Jun 27, 2012
1 parent 5b3afdb commit 0e4437c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mythtv/libs/libmythbase/logging.cpp
Expand Up @@ -198,9 +198,7 @@ char *LoggingItem::getThreadName(void)
return m_threadName;

QMutexLocker locker(&logThreadMutex);
char *name = logThreadHash.value(m_threadId, (char *)unknown);
m_threadName = strdup(name);
return m_threadName;
return logThreadHash.value(m_threadId, (char *)unknown);
}

/// \brief Get the thread ID of the thread that produced the LoggingItem
Expand Down Expand Up @@ -359,6 +357,7 @@ void LoggerThread::run(void)
{
qLock.unlock();
qApp->processEvents(QEventLoop::AllEvents, 10);
qApp->sendPostedEvents(NULL, QEvent::DeferredDelete);

qLock.relock();
if (logQueue.isEmpty())
Expand Down

0 comments on commit 0e4437c

Please sign in to comment.