Fri, 10 Jun 2022 20:42:36 -0500
fix memory leak when using purple accounts
Testing Done:
ran test_account_manager and test_notification (from /r/1502 where I first encountered that leak) in valgrind -> no more leak and no new invalid read/write
Reviewed at https://reviews.imfreedom.org/r/1503/
|
38534
28747a3cea35
Switch GnuTLS/NSS for Nettle in Meson build.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38492
diff
changeset
|
1 | PROGS = [ |
|
39974
cea80de2f5ac
Add some unit tests around purple_account_option_copy
Gary Kramlich <grim@reaperworld.com>
parents:
39484
diff
changeset
|
2 | 'account_option', |
|
41181
e859c41d8996
Create the PurpleAccountManager API
Gary Kramlich <grim@reaperworld.com>
parents:
41176
diff
changeset
|
3 | 'account_manager', |
|
39975
f691f3812205
Add some unit tests for the circular buffer.. they're not great, was just trying to test somethings
Gary Kramlich <grim@reaperworld.com>
parents:
39484
diff
changeset
|
4 | 'circular_buffer', |
|
40583
28964322556c
Add the new PurpleCredentialManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40564
diff
changeset
|
5 | 'credential_manager', |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
40351
diff
changeset
|
6 | 'credential_provider', |
|
41090
741992355ead
GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
41040
diff
changeset
|
7 | 'history_adapter', |
|
741992355ead
GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
41040
diff
changeset
|
8 | 'history_manager', |
|
38534
28747a3cea35
Switch GnuTLS/NSS for Nettle in Meson build.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38492
diff
changeset
|
9 | 'image', |
|
40351
79cbdc5c5989
Add some unit tests for key value pairs
Gary Kramlich <grim@reaperworld.com>
parents:
39979
diff
changeset
|
10 | 'keyvaluepair', |
|
40564
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
40548
diff
changeset
|
11 | 'markup', |
|
41403
0186ae21071f
Add purple_menu_populate_dynamic_targets to dynamically update GMenu's
Gary Kramlich <grim@reaperworld.com>
parents:
41243
diff
changeset
|
12 | 'menu', |
|
39974
cea80de2f5ac
Add some unit tests around purple_account_option_copy
Gary Kramlich <grim@reaperworld.com>
parents:
39484
diff
changeset
|
13 | 'protocol_action', |
|
38829
2be373489ef1
Start of unit tests for the PurpleProtocolXferInterface
Gary Kramlich <grim@reaperworld.com>
parents:
38534
diff
changeset
|
14 | 'protocol_xfer', |
|
41242
0343173db2f6
added basic tests for path based functions
ivanhoe <107501-ivanhoe@users.noreply.gitlab.com>
parents:
41181
diff
changeset
|
15 | 'purplepath', |
|
39166
7119cb1afdb8
tests: Add tests for PurpleQueuedOutputStream
Mike Ruprecht <cmaiku@gmail.com>
parents:
38937
diff
changeset
|
16 | 'queued_output_stream', |
|
38534
28747a3cea35
Switch GnuTLS/NSS for Nettle in Meson build.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38492
diff
changeset
|
17 | 'trie', |
|
28747a3cea35
Switch GnuTLS/NSS for Nettle in Meson build.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38492
diff
changeset
|
18 | 'util', |
|
41040
4be2eda9548a
Create PurpleWhiteboardManager for managing whiteboards
Gary Kramlich <grim@reaperworld.com>
parents:
41034
diff
changeset
|
19 | 'whiteboard_manager', |
|
4be2eda9548a
Create PurpleWhiteboardManager for managing whiteboards
Gary Kramlich <grim@reaperworld.com>
parents:
41034
diff
changeset
|
20 | 'xmlnode', |
|
38534
28747a3cea35
Switch GnuTLS/NSS for Nettle in Meson build.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38492
diff
changeset
|
21 | ] |
|
38831
d260f3b61831
The start of a ui for unit testing
Gary Kramlich <grim@reaperworld.com>
parents:
38830
diff
changeset
|
22 | |
|
38832
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
23 | test_ui = static_library( |
|
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
24 | 'test-ui', |
|
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
25 | 'test_ui.c', |
|
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
26 | 'test_ui.h', |
|
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
27 | c_args: [ |
|
41107
1570d8844e9a
Enable structured logging in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41090
diff
changeset
|
28 | '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()), |
|
1570d8844e9a
Enable structured logging in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41090
diff
changeset
|
29 | '-DG_LOG_USE_STRUCTURED', |
|
1570d8844e9a
Enable structured logging in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41090
diff
changeset
|
30 | '-DG_LOG_DOMAIN="Purple-TestUI"', |
|
38832
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
31 | ], |
|
39354
db17ba548304
libpurple: Drop DBus API bindings
Mike Ruprecht <cmaiku@gmail.com>
parents:
39166
diff
changeset
|
32 | dependencies: [libpurple_dep, glib] |
|
38832
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
33 | ) |
|
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
34 | |
|
38534
28747a3cea35
Switch GnuTLS/NSS for Nettle in Meson build.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38492
diff
changeset
|
35 | foreach prog : PROGS |
|
38848
22e32372b906
Fix a few typos and cleanup some whitespace
Gary Kramlich <grim@reaperworld.com>
parents:
38832
diff
changeset
|
36 | e = executable('test_' + prog, 'test_@0@.c'.format(prog), |
|
22e32372b906
Fix a few typos and cleanup some whitespace
Gary Kramlich <grim@reaperworld.com>
parents:
38832
diff
changeset
|
37 | c_args : [ |
|
22e32372b906
Fix a few typos and cleanup some whitespace
Gary Kramlich <grim@reaperworld.com>
parents:
38832
diff
changeset
|
38 | '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()) |
|
22e32372b906
Fix a few typos and cleanup some whitespace
Gary Kramlich <grim@reaperworld.com>
parents:
38832
diff
changeset
|
39 | ], |
|
39354
db17ba548304
libpurple: Drop DBus API bindings
Mike Ruprecht <cmaiku@gmail.com>
parents:
39166
diff
changeset
|
40 | dependencies : [libpurple_dep, glib], |
|
38832
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
41 | link_with: test_ui, |
|
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
42 | ) |
|
41243
53b46590623f
test_purplepath: replace g_get_home_dir with g_get_user_*_dir functions
ivanhoe <ivanhoe@fiscari.de>
parents:
41242
diff
changeset
|
43 | test(prog, e) |
|
38439
03f1a1642a68
Add meson build for libpurple only.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff
changeset
|
44 | endforeach |