[network-manager-applet/aleksander/mobile-providers: 16/19] libnm-gtk: plug memleaks
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/aleksander/mobile-providers: 16/19] libnm-gtk: plug memleaks
- Date: Tue, 27 Nov 2012 20:21:52 +0000 (UTC)
commit e185b9b6eadef0e316700da07f0cf66f156fffff
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue Nov 27 14:26:21 2012 +0100
libnm-gtk: plug memleaks
src/libnm-gtk/nm-mobile-providers.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/libnm-gtk/nm-mobile-providers.c b/src/libnm-gtk/nm-mobile-providers.c
index b99adb6..e40d800 100644
--- a/src/libnm-gtk/nm-mobile-providers.c
+++ b/src/libnm-gtk/nm-mobile-providers.c
@@ -741,8 +741,10 @@ parser_country_end (MobileParser *parser,
/* Store providers for this country */
country_info->providers = parser->current_providers;
+ g_free (parser->current_country);
parser->current_country = NULL;
parser->current_providers = NULL;
+ g_free (parser->text_buffer);
parser->text_buffer = NULL;
parser->state = PARSER_TOPLEVEL;
}
@@ -763,6 +765,7 @@ parser_provider_end (MobileParser *parser,
parser->current_providers = g_slist_prepend (parser->current_providers, parser->current_provider);
parser->current_provider = NULL;
+ g_free (parser->text_buffer);
parser->text_buffer = NULL;
parser->state = PARSER_COUNTRY;
}
@@ -773,6 +776,7 @@ parser_gsm_end (MobileParser *parser,
const char *name)
{
if (!strcmp (name, "gsm")) {
+ g_free (parser->text_buffer);
parser->text_buffer = NULL;
parser->state = PARSER_PROVIDER;
}
@@ -811,6 +815,7 @@ parser_gsm_apn_end (MobileParser *parser,
parser->current_provider->methods = g_slist_prepend (parser->current_provider->methods,
parser->current_method);
parser->current_method = NULL;
+ g_free (parser->text_buffer);
parser->text_buffer = NULL;
parser->state = PARSER_METHOD_GSM;
}
@@ -843,6 +848,7 @@ parser_cdma_end (MobileParser *parser,
parser->current_provider->methods = g_slist_prepend (parser->current_provider->methods,
parser->current_method);
parser->current_method = NULL;
+ g_free (parser->text_buffer);
parser->text_buffer = NULL;
parser->state = PARSER_PROVIDER;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]