mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
Fix redefinition of local variable in gio/gdbusauthmechanismsha1.c
This commit is contained in:
parent
c2b60e0323
commit
eb157bfa1b
@ -660,7 +660,7 @@ keyring_generate_entry (const gchar *cookie_context,
|
||||
gchar *keyring_dir;
|
||||
gchar *path;
|
||||
gchar *contents;
|
||||
GError *local_error;
|
||||
GError *local_error = NULL;
|
||||
gchar **lines;
|
||||
gint max_line_id;
|
||||
GString *new_contents;
|
||||
@ -696,7 +696,6 @@ keyring_generate_entry (const gchar *cookie_context,
|
||||
if (lock_fd == -1)
|
||||
goto out;
|
||||
|
||||
local_error = NULL;
|
||||
contents = NULL;
|
||||
if (!g_file_get_contents (path,
|
||||
&contents,
|
||||
@ -706,12 +705,12 @@ keyring_generate_entry (const gchar *cookie_context,
|
||||
if (local_error->domain == G_FILE_ERROR && local_error->code == G_FILE_ERROR_NOENT)
|
||||
{
|
||||
/* file doesn't have to exist */
|
||||
g_error_free (local_error);
|
||||
g_clear_error (&local_error);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_propagate_prefixed_error (error,
|
||||
local_error,
|
||||
g_steal_pointer (&local_error),
|
||||
_("Error opening keyring “%s” for writing: "),
|
||||
path);
|
||||
goto out;
|
||||
@ -890,11 +889,11 @@ keyring_generate_entry (const gchar *cookie_context,
|
||||
}
|
||||
|
||||
out:
|
||||
/* Any error should have been propagated to @error by now */
|
||||
g_assert (local_error == NULL);
|
||||
|
||||
if (lock_fd != -1)
|
||||
{
|
||||
GError *local_error;
|
||||
local_error = NULL;
|
||||
if (!keyring_release_lock (path, lock_fd, &local_error))
|
||||
{
|
||||
if (error != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user