diff options
author | Thomas Haller <thaller@redhat.com> | 2016-05-13 14:19:59 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-05-13 14:26:52 +0200 |
commit | 9a37d1d970bf5bf1aab35468aabccb8cbfe2a39b (patch) | |
tree | a62f9a3f899ca80b367ca1cbee2e509c3d43ade5 | |
parent | 5660bbfacc2d1c96a8cf9dc542312a1468646543 (diff) |
libnm: don't require initialized @out_encrypted argument in nm_utils_file_is_private_key()
No need to require the caller to initialize the optional out-argument.
Otherwise we get:
(nm-connection-editor:2471): libnm-CRITICAL **: nm_utils_file_is_private_key: assertion 'out_encrypted == NULL || *out_encrypted == FALSE' failed
https://bugzilla.gnome.org/show_bug.cgi?id=763578
Fixes: 1c4f41c61013d79a32eeac246d204c2f378e6915
(cherry picked from commit 81499355b049fffadfa6576bbcd2d2fb9fac9d13)
-rw-r--r-- | libnm-core/nm-utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index 70c268faa2..1080d9ea20 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -2399,8 +2399,8 @@ nm_utils_file_is_private_key (const char *filename, gboolean *out_encrypted) const char *extensions[] = { ".der", ".pem", ".p12", ".key", NULL }; g_return_val_if_fail (filename != NULL, FALSE); - g_return_val_if_fail (out_encrypted == NULL || *out_encrypted == FALSE, FALSE); + NM_SET_OUT (out_encrypted, FALSE); if (!file_has_extension (filename, extensions)) return FALSE; |