diff options
| -rw-r--r-- | .github/workflows/builds.yml | 2 | ||||
| -rw-r--r-- | drivemount/src/drive-button.c | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index d01726f7..f97934e8 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -79,7 +79,7 @@ jobs: # INFO: Depends on mate-desktop 1.27.1+, so we should install it from source. - name: Cache mate-desktop binary packages - uses: actions/cache@v5 + uses: actions/cache@v6 id: cache-mate-desktop with: path: ${{ env.CACHE_PATH }} diff --git a/drivemount/src/drive-button.c b/drivemount/src/drive-button.c index d33600f0..80f4b7ce 100644 --- a/drivemount/src/drive-button.c +++ b/drivemount/src/drive-button.c @@ -144,6 +144,15 @@ drive_button_dispose (GObject *object) { DriveButton *self = DRIVE_BUTTON (object); + /* The "changed" handler was connected to the process-global default icon + * theme (see drive_button_new / drive_button_new_from_mount), which + * outlives this button. If we don't disconnect it, the theme keeps a + * dangling pointer to the freed button and a later "changed" emission + * schedules drive_button_update() on freed memory -> use-after-free crash. */ + g_signal_handlers_disconnect_by_func (gtk_icon_theme_get_default (), + G_CALLBACK (drive_button_theme_change), + self); + drive_button_set_volume (self, NULL); if (self->update_tag) |
