Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/network-manager:fix-leaks-1.2.2 into ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:network-manager/xenial/1.2.2

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: 10d8373cbc5ada5d94446b7e51e2894377ef5874
Merged at revision: ee7b759a6a106fe6ad91862c5cf4a1c3cca0b7f9
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/network-manager:fix-leaks-1.2.2
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:network-manager/xenial/1.2.2
Diff against target: 47 lines (+4/-3)
3 files modified
src/nm-config.c (+1/-1)
src/nm-core-utils.c (+1/-0)
src/settings/nm-settings-connection.c (+2/-2)
Reviewer Review Type Date Requested Status
Alfonso Sanchez-Beato continuous-integration Approve
System Enablement Bot continuous-integration Needs Fixing
Review via email: mp+394125@code.launchpad.net

Commit message

Fix memory leaks introduced in snap patches

Fix memory leaks that were introducing while adapting NM to use paths
inside the snap (LP#1902271).

Description of the change

Fix memory leaks introduced in snap patches

Fix memory leaks that were introducing while adapting NM to use paths
inside the snap (LP#1902271).

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/src/nm-config.c b/src/nm-config.c
index dac47c5..7753e9d 100644
--- a/src/nm-config.c
+++ b/src/nm-config.c
@@ -42,7 +42,7 @@
4242
43static const char *get_no_auto_default_file_path()43static const char *get_no_auto_default_file_path()
44{44{
45 const char *no_auto_default_file = NULL;45 static const char *no_auto_default_file = NULL;
4646
47 if (!no_auto_default_file)47 if (!no_auto_default_file)
48 no_auto_default_file = g_strdup_printf("%s/no-auto-default.state", nm_utils_get_state_dir());48 no_auto_default_file = g_strdup_printf("%s/no-auto-default.state", nm_utils_get_state_dir());
diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c
index 9701e48..517dad0 100644
--- a/src/nm-core-utils.c
+++ b/src/nm-core-utils.c
@@ -2691,6 +2691,7 @@ nm_utils_secret_key_read (gsize *out_key_len, GError **error)
2691 }2691 }
26922692
2693out:2693out:
2694 g_free (secret_key_path);
2694 if (key_len) {2695 if (key_len) {
2695 *out_key_len = key_len;2696 *out_key_len = key_len;
2696 return secret_key;2697 return secret_key;
diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c
index 3830769..d2504f9 100644
--- a/src/settings/nm-settings-connection.c
+++ b/src/settings/nm-settings-connection.c
@@ -38,7 +38,7 @@
3838
39static const char *get_settings_timestamps_path()39static const char *get_settings_timestamps_path()
40{40{
41 const char *timestamps_path = NULL;41 static const char *timestamps_path = NULL;
4242
43 if (!timestamps_path)43 if (!timestamps_path)
44 timestamps_path = g_strdup_printf("%s/timestamps", nm_utils_get_state_dir());44 timestamps_path = g_strdup_printf("%s/timestamps", nm_utils_get_state_dir());
@@ -48,7 +48,7 @@ static const char *get_settings_timestamps_path()
4848
49static const char *get_settings_seen_bssids_path()49static const char *get_settings_seen_bssids_path()
50{50{
51 const char *seen_bssids_path = NULL;51 static const char *seen_bssids_path = NULL;
5252
53 if (!seen_bssids_path)53 if (!seen_bssids_path)
54 seen_bssids_path = g_strdup_printf("%s/seen-bssids", nm_utils_get_state_dir());54 seen_bssids_path = g_strdup_printf("%s/seen-bssids", nm_utils_get_state_dir());

Subscribers

People subscribed via source and target branches