Merge ~morphis/snappy-hwe-snaps/+git/network-manager:network-manager/fix-settings-memory-leak into ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:network-manager/1.2.2

Proposed by Simon Fels
Status: Merged
Approved by: Simon Fels
Approved revision: f25370d040bfa34ebb1547a369e42c5ee20a556c
Merged at revision: 534801d454988a29c4bc9f13024245c1b0753db5
Proposed branch: ~morphis/snappy-hwe-snaps/+git/network-manager:network-manager/fix-settings-memory-leak
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:network-manager/1.2.2
Diff against target: 22 lines (+2/-2)
1 file modified
src/settings/nm-settings-connection.c (+2/-2)
Reviewer Review Type Date Requested Status
Tony Espy Approve
Review via email: mp+303268@code.launchpad.net

Description of the change

Fix memory leak which will cause huge memory consumption over time

Changes:

 * [SNAPPY] Use static to make sure memory is only allocated once

To post a comment you must log in.
Revision history for this message
Simon Fels (morphis) wrote :
Revision history for this message
Tony Espy (awe) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c
2index 3830769..d2504f9 100644
3--- a/src/settings/nm-settings-connection.c
4+++ b/src/settings/nm-settings-connection.c
5@@ -38,7 +38,7 @@
6
7 static const char *get_settings_timestamps_path()
8 {
9- const char *timestamps_path = NULL;
10+ static const char *timestamps_path = NULL;
11
12 if (!timestamps_path)
13 timestamps_path = g_strdup_printf("%s/timestamps", nm_utils_get_state_dir());
14@@ -48,7 +48,7 @@ static const char *get_settings_timestamps_path()
15
16 static const char *get_settings_seen_bssids_path()
17 {
18- const char *seen_bssids_path = NULL;
19+ static const char *seen_bssids_path = NULL;
20
21 if (!seen_bssids_path)
22 seen_bssids_path = g_strdup_printf("%s/seen-bssids", nm_utils_get_state_dir());

Subscribers

People subscribed via source and target branches