[network-manager-iodine] properties: avoid double initialization of error
- From: Beniamino Galvani <bgalvani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-iodine] properties: avoid double initialization of error
- Date: Wed, 14 Feb 2018 13:50:54 +0000 (UTC)
commit 215a60829eb8871d2e5b312e256c09085dd8301c
Author: Beniamino Galvani <bgalvani redhat com>
Date: Wed Feb 14 14:09:41 2018 +0100
properties: avoid double initialization of error
Fixes the following runtime error:
(nm-connection-editor:22122): GLib-WARNING **: GError set over the
top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is
NULL before it's set.
The overwriting error message was: does not look like a Iodine DNS
Tunnel VPN connection (parse failed)
properties/nm-iodine.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/properties/nm-iodine.c b/properties/nm-iodine.c
index a0a51de..50e4036 100644
--- a/properties/nm-iodine.c
+++ b/properties/nm-iodine.c
@@ -129,7 +129,7 @@ import (NMVpnEditorPlugin *iface, const char *path, GError **error)
keyfile = g_key_file_new ();
flags = G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS;
- if (!g_key_file_load_from_file (keyfile, path, flags, error)) {
+ if (!g_key_file_load_from_file (keyfile, path, flags, NULL)) {
g_set_error (error,
NM_IODINE_IMPORT_EXPORT_ERROR,
NM_IODINE_IMPORT_EXPORT_ERROR_NOT_IODINE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]