** Tags added: patch

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-terminal in Ubuntu.
https://bugs.launchpad.net/bugs/1088352

Title:
  gnome-terminal leaks memory on startup after call to g_listenv

Status in “gnome-terminal” package in Ubuntu:
  In Progress

Bug description:
  gnome-terminal leaks memory on startup because it calls g_listenv
  without freeing the resulting list of strings.  Per the docs, this
  list must be freed:

  http://developer.gnome.org/glib/2.32/glib-Miscellaneous-Utility-
  Functions.html#g-listenv

  g_listenv():  Returns: a NULL-terminated list of strings which must be
  freed with g_strfreev(). [array zero-terminated=1][transfer full]

  
  Here's the valgrind report with the leak:

  ==13350== 1,877 (728 direct, 1,149 indirect) bytes in 1 blocks are definitely 
lost in loss record 5,623 of 5,715
  ==13350==    at 0x4C29DB4: calloc (vg_replace_malloc.c:566)
  ==13350==    by 0x6ABA718: g_malloc0 (gmem.c:189)
  ==13350==    by 0x6AA123F: g_listenv (genviron.c:399)
  ==13350==    by 0x416901: name_lost_cb (terminal.c:328)
  ==13350==    by 0x5EF973D: do_call (gdbusnameowning.c:215)
  ==13350==    by 0x5EF99AF: request_name_cb (gdbusnameowning.c:334)
  ==13350==    by 0x5EA0F76: g_simple_async_result_complete 
(gsimpleasyncresult.c:775)
  ==13350==    by 0x5EF1831: g_dbus_connection_call_done 
(gdbusconnection.c:5339)
  ==13350==    by 0x5EA0F76: g_simple_async_result_complete 
(gsimpleasyncresult.c:775)
  ==13350==    by 0x5EA1078: complete_in_idle_cb (gsimpleasyncresult.c:787)
  ==13350==    by 0x6AB4A94: g_main_context_dispatch (gmain.c:2715)
  ==13350==    by 0x6AB4DC7: g_main_context_iterate.isra.24 (gmain.c:3290)
  ==13350==    by 0x6AB51C1: g_main_loop_run (gmain.c:3484)
  ==13350==    by 0x5464064: gtk_main (gtkmain.c:1160)
  ==13350==    by 0x4135B2: main (terminal.c:601)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1088352/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to