[file-roller] Fix a memory leak when pasting from the clipboard
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] Fix a memory leak when pasting from the clipboard
- Date: Tue, 6 Sep 2016 16:07:46 +0000 (UTC)
commit b7891af0c7e639f40e2b85123d0a906496bf52a3
Author: David King <dking redhat com>
Date: Wed May 11 11:08:06 2016 +0100
Fix a memory leak when pasting from the clipboard
==31891== 37 bytes in 1 blocks are definitely lost in loss record 9,576 of 23,250
==31891== at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
==31891== by 0x73FD038: g_malloc (gmem.c:94)
==31891== by 0x74154B0: g_strconcat (gstrfuncs.c:585)
==31891== by 0x73DC021: g_escape_file_uri (gconvert.c:1388)
==31891== by 0x73DC021: g_filename_to_uri (gconvert.c:1737)
==31891== by 0x43F503: fr_window_paste_from_clipboard_data (fr-window.c:8809)
==31891== by 0x44524B: fr_window_paste_selection_to (fr-window.c:8859)
==31891== by 0x44524B: fr_window_paste_selection (fr-window.c:8900)
==31891== by 0x716D517: g_closure_invoke (gclosure.c:804)
==31891== by 0x717ED91: signal_emit_unlocked_R (gsignal.c:3629)
==31891== by 0x718796A: g_signal_emit_valist (gsignal.c:3385)
==31891== by 0x7187D81: g_signal_emit (gsignal.c:3441)
==31891== by 0x6E8E7E4: g_simple_action_activate (gsimpleaction.c:225)
==31891== by 0x512D2D0: gtk_action_muxer_activate_action (gtkactionmuxer.c:412)
==31891== by 0x512D2F3: gtk_action_muxer_activate_action (gtkactionmuxer.c:414)
==31891== by 0x52727C5: gtk_menu_tracker_item_activated (gtkmenutrackeritem.c:789)
==31891== by 0x716D517: g_closure_invoke (gclosure.c:804)
==31891== by 0x717ED91: signal_emit_unlocked_R (gsignal.c:3629)
==31891== by 0x718796A: g_signal_emit_valist (gsignal.c:3385)
==31891== by 0x7187D81: g_signal_emit (gsignal.c:3441)
==31891== by 0x538FBED: gtk_widget_activate (gtkwidget.c:7736)
==31891== by 0x526F595: gtk_menu_shell_activate_item (gtkmenushell.c:1369)
https://bugzilla.gnome.org/show_bug.cgi?id=766271
src/fr-window.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index 1a7e14e..339723c 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -8804,12 +8804,16 @@ fr_window_paste_from_clipboard_data (FrWindow *window,
dir = _g_path_remove_level (new_name);
if ((dir != NULL) && (g_hash_table_lookup (created_dirs, dir) == NULL)) {
GFile *directory;
+ char *uri;
directory = _g_file_append_path (data->tmp_dir, dir, NULL);
- debug (DEBUG_INFO, "mktree %s\n", g_file_get_uri (directory));
+ uri = g_file_get_uri (directory);
+ debug (DEBUG_INFO, "mktree %s\n", uri);
_g_file_make_directory_tree (directory, 0700, NULL);
g_hash_table_replace (created_dirs, g_strdup (dir), GINT_TO_POINTER (1));
+
+ g_free (uri);
}
g_free (dir);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]