Skip to content

Commit 053b49e

Browse files
author
Paul Harrison
committed
mytharchivehelper: Remove the cleanup guard
For some reason the cleanup guard was causing random segfaults in MythSystemSignalManager . Removing it and deleting gContext just before exit() is called seems to have fixed it.
1 parent b1edf24 commit 053b49e

File tree

1 file changed

+6
-1
lines changed
  • mythplugins/mytharchive/mytharchivehelper

1 file changed

+6
-1
lines changed

mythplugins/mytharchive/mytharchivehelper/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2652,11 +2652,13 @@ int main(int argc, char **argv)
26522652
// Don't listen to console input
26532653
close(0);
26542654

2655-
CleanupGuard callCleanup(cleanup);
2655+
//CleanupGuard callCleanup(cleanup);
26562656
gContext = new MythContext(MYTH_BINARY_VERSION);
26572657
if (!gContext->Init(false))
26582658
{
26592659
LOG(VB_GENERAL, LOG_ERR, "Failed to init MythContext, exiting.");
2660+
delete gContext;
2661+
gContext = NULL;
26602662
return GENERIC_EXIT_NO_MYTHCONTEXT;
26612663
}
26622664

@@ -2815,6 +2817,9 @@ int main(int argc, char **argv)
28152817
else
28162818
cmdline.PrintHelp();
28172819

2820+
delete gContext;
2821+
gContext = NULL;
2822+
28182823
exit(res);
28192824
}
28202825

0 commit comments

Comments
 (0)