Ticket #12131: logging.patch

File logging.patch, 776 bytes (added by faginbagin <mythtv@…>, 6 years ago)
  • mythtv/libs/libmythbase/logging.h

    diff --git a/mythtv/libs/libmythbase/logging.h b/mythtv/libs/libmythbase/logging.h
    index fd74a94..8b936e8 100644
    a b class LoggingItem: public QObject, public ReferenceCounter 
    121121    void setFunction(const QString &val)
    122122            { m_function = strdup(val.toLocal8Bit().constData()); };
    123123    void setThreadName(const QString &val)
    124             { m_threadName = strdup(val.toLocal8Bit().constData()); };
     124    {
     125        if (m_threadName) free (m_threadName);
     126        m_threadName = strdup(val.toLocal8Bit().constData());
     127    };
    125128    void setAppName(const QString &val)
    126129            { m_appName = strdup(val.toLocal8Bit().constData()); };
    127130    void setTable(const QString &val)