diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2011-11-16 12:33:56 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-11-18 15:42:30 +0100 |
commit | f3504a12b09a5eef133679e6f52615a1df90e810 (patch) | |
tree | a922f5280a432d759f23749679de3374d82f1160 /plugins/vpnc.c | |
parent | 76ab155840b995c1f535627df6d7e7cb41966bb6 (diff) | |
download | connman-f3504a12b09a5eef133679e6f52615a1df90e810.tar.gz connman-f3504a12b09a5eef133679e6f52615a1df90e810.tar.bz2 connman-f3504a12b09a5eef133679e6f52615a1df90e810.zip |
plugins: Don't attempt to save strings with value NULL
If a string with value NULL is set with g_key_file_set_string(),
a critical glib error will be printed.
Diffstat (limited to 'plugins/vpnc.c')
-rw-r--r-- | plugins/vpnc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/vpnc.c b/plugins/vpnc.c index fceed6b4..cd707dc1 100644 --- a/plugins/vpnc.c +++ b/plugins/vpnc.c @@ -238,6 +238,9 @@ static int vc_save(struct connman_provider *provider, GKeyFile *keyfile) if (strncmp(vpnc_options[i].cm_opt, "VPNC.", 5) == 0) { option = connman_provider_get_string(provider, vpnc_options[i].cm_opt); + if (option == NULL) + continue; + g_key_file_set_string(keyfile, connman_provider_get_save_group(provider), vpnc_options[i].cm_opt, option); |