[mythtv-commits] [MythTV/mythtv] 9b5190: Stop memory use after free (#1132)

Steve Erlenborn noreply at github.com
Mon Jun 9 21:42:36 UTC 2025


  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: 9b51903e5faec1e5581a4a8c8332be588dab2bed
      https://github.com/MythTV/mythtv/commit/9b51903e5faec1e5581a4a8c8332be588dab2bed
  Author: Steve Erlenborn <1751095+SteveErl at users.noreply.github.com>
  Date:   2025-06-09 (Mon, 09 Jun 2025)

  Changed paths:
    M mythtv/libs/libmythtv/tv_play.cpp
    M mythtv/libs/libmythtv/tv_play.h

  Log Message:
  -----------
  Stop memory use after free (#1132)

MConcurrent was used to launch a separate thread to
take on the task of saving the playback position.
However, MConcurrent doesn't provide any way of
tracking the progress of that task. This is now
switched to use MThreadPool. With a handle to this
thread pool, we can call waitForDone() to wait
for the completion of the saving playback position
task in TV::~TV(). This eliminates the race
condition between the threads, and stops the
reference to memory which has already been freed.

Resolves: #1131



To unsubscribe from these emails, change your notification settings at https://github.com/MythTV/mythtv/settings/notifications


More information about the mythtv-commits mailing list