You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2018/07/12 18:49:44 UTC

svn commit: r1835760 - /subversion/trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c

Author: danielsh
Date: Thu Jul 12 18:49:43 2018
New Revision: 1835760

URL: http://svn.apache.org/viewvc?rev=1835760&view=rev
Log:
* subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
  (password_get_gnome_keyring, password_set_gnome_keyring):
    [in the SVN_HAVE_LIBSECRET version of these two functions]
    Always initialize the output parameter.

Found by: Jan Palus
Tested by: Jan Palus
(just the getter)

Modified:
    subversion/trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c

Modified: subversion/trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c?rev=1835760&r1=1835759&r2=1835760&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c (original)
+++ subversion/trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c Thu Jul 12 18:49:43 2018
@@ -118,6 +118,8 @@ password_get_gnome_keyring(svn_boolean_t
 {
   GError *gerror = NULL;
   gchar *gpassword;
+
+  *done = FALSE;
   
   if (!available_collection(non_interactive, pool))
     return SVN_NO_ERROR;
@@ -129,6 +131,7 @@ password_get_gnome_keyring(svn_boolean_t
                                           NULL);
   if (gerror)
     {
+      /* ### TODO: return or log the error? */
       g_error_free(gerror);
     }
   else if (gpassword)
@@ -156,6 +159,8 @@ password_set_gnome_keyring(svn_boolean_t
   GError *gerror = NULL;
   gboolean gstatus;
   
+  *done = FALSE;
+
   if (!available_collection(non_interactive, pool))
     return SVN_NO_ERROR;
 
@@ -170,6 +175,7 @@ password_set_gnome_keyring(svn_boolean_t
                                        NULL);
   if (gerror)
     {
+      /* ### TODO: return or log the error? */
       g_error_free(gerror);
     }
   else if (gstatus)