diff options
author | Dan Williams <dcbw@redhat.com> | 2009-10-11 11:31:23 -0700 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2009-10-11 11:31:23 -0700 |
commit | bdd60a4941b5e8948dd6397208f1ac4cfee61907 (patch) | |
tree | 838a06dd3cab725474d10c2e671bccd4d826e720 /src | |
parent | 81163b3032e623e46ef2f60f661ef0306680c241 (diff) |
cdma: fix memory leak parsing serving system results
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-generic-cdma.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/mm-generic-cdma.c b/src/mm-generic-cdma.c index 1cfa924f..942834db 100644 --- a/src/mm-generic-cdma.c +++ b/src/mm-generic-cdma.c @@ -738,11 +738,25 @@ serving_system_done (MMSerialPort *port, g_regex_match (r, reply, 0, &match_info); if (g_match_info_get_match_count (match_info) >= 3) { - class = normalize_class (g_match_info_fetch (match_info, 1)); - band = normalize_band (g_match_info_fetch (match_info, 2), &override_class); + char *str; + + /* band class */ + str = g_match_info_fetch (match_info, 1); + class = normalize_class (str); + g_free (str); + + /* band */ + str = g_match_info_fetch (match_info, 2); + band = normalize_band (str, &override_class); if (override_class) class = override_class; - sid = normalize_sid (g_match_info_fetch (match_info, 3)); + g_free (str); + + /* sid */ + str = g_match_info_fetch (match_info, 3); + sid = normalize_sid (str); + g_free (str); + success = TRUE; } |