gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 24/28: REST: don't leak basic_auth_file.


From: gnunet
Subject: [gnunet] 24/28: REST: don't leak basic_auth_file.
Date: Mon, 06 Feb 2023 06:19:26 +0100

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 74bebb5c9f2aa2efc6a74fd4b5d8c2af76742470
Author: ulfvonbelow <strilen@tilde.club>
AuthorDate: Sun Jan 29 06:01:34 2023 -0600

    REST: don't leak basic_auth_file.
    
    Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
---
 src/rest/gnunet-rest-server.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/rest/gnunet-rest-server.c b/src/rest/gnunet-rest-server.c
index f9a949e61..5163c2271 100644
--- a/src/rest/gnunet-rest-server.c
+++ b/src/rest/gnunet-rest-server.c
@@ -1193,6 +1193,7 @@ run (void *cls,
         GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
                                   "write",
                                   basic_auth_file);
+      GNUNET_free (basic_auth_file);
     }
     else
     {
@@ -1205,8 +1206,10 @@ run (void *cls,
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     "Unable to read basic auth secret file.\n");
         GNUNET_SCHEDULER_shutdown ();
+        GNUNET_free (basic_auth_file);
         return;
       }
+      GNUNET_free (basic_auth_file);
       if (0 != getlogin_r (cuser, _POSIX_LOGIN_NAME_MAX))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]