diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2012-09-05 12:10:26 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-09-07 08:38:00 +0300 |
commit | 1c2f7a9c8d7fdd9b68d19df1098b27909add2257 (patch) | |
tree | ab4927d5c2fcba15018d114ca84b0bcb670eaf1a /src/technology.c | |
parent | ff66f199d5e59c70be84fecdb74a5c4d10679a2c (diff) | |
download | connman-1c2f7a9c8d7fdd9b68d19df1098b27909add2257.tar.gz connman-1c2f7a9c8d7fdd9b68d19df1098b27909add2257.tar.bz2 connman-1c2f7a9c8d7fdd9b68d19df1098b27909add2257.zip |
technology: Fix memory leak as the tethering strings were not freed
Diffstat (limited to 'src/technology.c')
-rw-r--r-- | src/technology.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/technology.c b/src/technology.c index c1400154..23122f28 100644 --- a/src/technology.c +++ b/src/technology.c @@ -730,6 +730,7 @@ static DBusMessage *set_property(DBusConnection *conn, if (strlen(str) < 1 || strlen(str) > 32) return __connman_error_invalid_arguments(msg); + g_free(technology->tethering_ident); technology->tethering_ident = g_strdup(str); technology_save(technology); } else if (g_str_equal(name, "TetheringPassphrase") == TRUE) { @@ -743,6 +744,7 @@ static DBusMessage *set_property(DBusConnection *conn, if (strlen(str) < 8 || strlen(str) > 63) return __connman_error_passphrase_required(msg); + g_free(technology->tethering_passphrase); technology->tethering_passphrase = g_strdup(str); technology_save(technology); } else if (g_str_equal(name, "Powered") == TRUE) { @@ -998,6 +1000,8 @@ static void technology_put(struct connman_technology *technology) g_free(technology->path); g_free(technology->regdom); + g_free(technology->tethering_ident); + g_free(technology->tethering_passphrase); g_free(technology); } |