Thu, 02 Mar 2023 23:58:21 -0600
Fix leaks in debug window
Fixes two leaks from the debug window:
```
22 bytes in 1 blocks are definitely lost in loss record 7,038 of 41,972
at 0x484386F: malloc (vg_replace_malloc.c:393)
by 0x4980168: g_malloc (gmem.c:130)
by 0x4995602: g_strdup (gstrfuncs.c:363)
by 0x4CFB782: purple_prefs_connect_callback (prefs.c:1301)
by 0x48AA524: pidgin_debug_init (pidgindebug.c:918)
by 0x48B8F9E: pidgin_ui_start (pidginui.c:146)
by 0x4D37B01: purple_ui_start (purpleui.c:397)
by 0x4CE3BA6: purple_core_init (core.c:211)
by 0x48A384F: pidgin_application_startup (pidginapplication.c:820)
by 0x4DD3553: UnknownInlinedFun (gclosure.c:895)
by 0x4DD3553: g_signal_emit_valist (gsignal.c:3456)
by 0x4DD3632: g_signal_emit (gsignal.c:3606)
by 0x5815B82: g_application_register (gapplication.c:2211)
```
and
```
32 bytes in 1 blocks are definitely lost in loss record 15,308 of 41,972
at 0x484386F: malloc (vg_replace_malloc.c:393)
by 0x4980168: g_malloc (gmem.c:130)
by 0x4997AB5: g_slice_alloc (gslice.c:1074)
by 0x495E14C: UnknownInlinedFun (gdatetime.c:678)
by 0x495E14C: g_date_time_from_instant (gdatetime.c:774)
by 0x495F4E9: g_date_time_new_now_local (gdatetime.c:989)
by 0x48A82F9: save_response_cb (pidgindebug.c:136)
by 0x4DB4375: g_cclosure_marshal_VOID__INTv (gmarshal.c:596)
by 0x4DD3553: UnknownInlinedFun (gclosure.c:895)
by 0x4DD3553: g_signal_emit_valist (gsignal.c:3456)
by 0x4DD3632: g_signal_emit (gsignal.c:3606)
by 0x4DB5FBF: g_closure_invoke (gclosure.c:832)
by 0x4DE3D85: signal_emit_unlocked_R.isra.0 (gsignal.c:3796)
by 0x4DD3419: g_signal_emit_valist (gsignal.c:3549)
```
Testing Done:
Ran in valgrind, saved the debug logs to a file, and the above leaks were gone.
Reviewed at https://reviews.imfreedom.org/r/2304/
|
42011
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | # error "only <pidgin.h> may be included directly" |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #endif |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #ifndef PIDGIN_CONTACT_LIST_H |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #define PIDGIN_CONTACT_LIST_H |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <glib.h> |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | #include <adwaita.h> |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | #include <gtk/gtk.h> |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | G_BEGIN_DECLS |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | /** |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | * PidginContactList: |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | * |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | * #PidginContactList is a widget that displays the [iface@Gio.ListModel] of |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | * [class@Purple.Person] from [class@Purple.ContactManager]. |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | * |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | * Since: 3.0.0 |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | */ |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | #define PIDGIN_TYPE_CONTACT_LIST (pidgin_contact_list_get_type()) |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | G_DECLARE_FINAL_TYPE(PidginContactList, pidgin_contact_list, PIDGIN, |
|
42059
e6dcbf0db616
Add search support to the contact list
Gary Kramlich <grim@reaperworld.com>
parents:
42011
diff
changeset
|
49 | CONTACT_LIST, GtkBox) |
|
42011
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | /** |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | * pidgin_contact_list_new: |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | * |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | * Creates a new #PidginContactList instance that will display |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | * [iface@Gio.ListModel] of [class@Purple.Person] from |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | * [class@Purple.ContactManager]. |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | * |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | * Returns: (transfer full): The new #PidginContactList instance. |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | */ |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | GtkWidget *pidgin_contact_list_new(void); |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | G_END_DECLS |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | |
|
bb38b9441073
Create a new PidginContactList widget that shows the PurplePersons that PurpleContactManager is tracking
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | #endif /* PIDGIN_CONTACT_LIST_H */ |