Skip to content

Fix several memory leaks#3721

Open
KonTy wants to merge 1 commit intolinuxmint:masterfrom
KonTy:fix/memory-leaks
Open

Fix several memory leaks#3721
KonTy wants to merge 1 commit intolinuxmint:masterfrom
KonTy:fix/memory-leaks

Conversation

@KonTy
Copy link

@KonTy KonTy commented Mar 6, 2026

Fix missing free/unref calls found via static analysis:

  • nemo-mime-actions.c: free g_file_get_path() result after admin URI construction, unref NemoFile in open_with_dialog_response_cb, free uri and mime_type in run_open_with_dialog
  • nemo-open-with-main.c: unref NemoFile in app_chooser_dialog_response_cb
  • nemo-window.c: free sidebar_id before overwriting with g_settings_get_string()
  • nemo-file-conflict-dialog.c: use g_autofree for dest_name and dest_dir_name
  • nemo-properties-window.c: free uri after g_file_new_for_uri()

Validated with Valgrind — 0 bytes definitely or possibly lost.

Free results from g_file_get_path(), nemo_file_get_by_uri(),
nemo_file_get_display_name(), nemo_file_get_activation_uri(),
and g_settings_get_string() that were missing cleanup calls.
@KonTy KonTy changed the title fix: plug several memory leaks Fix several memory leaks Mar 6, 2026
@KonTy KonTy force-pushed the fix/memory-leaks branch from 8dfd1fd to 76562b0 Compare March 6, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant