aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gsr-replay-page.c
diff options
context:
space:
mode:
authorTrung Lê <8@tle.id.au>2026-02-22 11:29:18 +1100
committerTrung Lê <8@tle.id.au>2026-02-22 11:29:18 +1100
commit9690617ae3855ab9f58e5bce0f55b4842b9832e5 (patch)
tree22fb5532cbaf4a6f0c4b1714f563aebf68b52918 /src/gsr-replay-page.c
parent442c8be65ac2ba1fdcbcfa8204adec5fecb2c474 (diff)
Prepare 1.0.0: fix memory leaks, use-after-free bugs, and code quality issues
- Version 6.0.0 → 1.0.0, C standard gnu17 → gnu23 - Fix desktop file path (was referencing parent directory) - global_shortcuts.c: fix systematic GVariant/GDBusProxy leaks, guint64-to-gchar* type mismatch, buffer overflow risk, missing malloc NULL checks, debug artifacts - gsr-window.c: fix notification timeout use-after-free, menu object leak in finalize, localtime NULL check, extract active_mode_to_string helper - gsr-stream-page.c, gsr-record-page.c, gsr-replay-page.c: fix timer source leak in finalize (use-after-free if destroyed while timer running) - gsr-shortcut-accel-dialog.c: fix Pango markup injection via shortcut titles - gsr-info.c: fix pclose UB, replace fprintf with g_warning - gsr-config.c: include errno in fopen failure warning - Remove unused include, stale Phase 5 comments
Diffstat (limited to 'src/gsr-replay-page.c')
-rw-r--r--src/gsr-replay-page.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gsr-replay-page.c b/src/gsr-replay-page.c
index 67c7c9a..4dcbc81 100644
--- a/src/gsr-replay-page.c
+++ b/src/gsr-replay-page.c
@@ -490,6 +490,12 @@ static void
gsr_replay_page_finalize(GObject *object)
{
GsrReplayPage *self = GSR_REPLAY_PAGE(object);
+
+ if (self->timer_source_id) {
+ g_source_remove(self->timer_source_id);
+ self->timer_source_id = 0;
+ }
+
g_free(self->save_directory);
#ifdef HAVE_X11
g_free(self->x11_start_stop_accel);