gsasl-commit
[Top][All Lists]
Advanced

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

CVS gsasl/lib/src


From: gsasl-commit
Subject: CVS gsasl/lib/src
Date: Mon, 24 Oct 2005 00:03:32 +0200

Update of /home/cvs/gsasl/lib/src
In directory dopio:/tmp/cvs-serv29692

Modified Files:
        md5pwd.c 
Log Message:
Fix memory leak.


--- /home/cvs/gsasl/lib/src/md5pwd.c    2005/06/25 09:52:14     1.5
+++ /home/cvs/gsasl/lib/src/md5pwd.c    2005/10/23 22:03:31     1.6
@@ -69,10 +69,15 @@
            {
              *key = malloc (strlen (line) - userlen);
              if (!*key)
-               return GSASL_MALLOC_ERROR;
+               {
+                 free (line);
+                 return GSASL_MALLOC_ERROR;
+               }
 
              strcpy (*key, line + userlen + 1);
 
+             free (line);
+
              fclose (fh);
 
              return GSASL_OK;
@@ -82,5 +87,8 @@
       fclose (fh);
     }
 
+  if (line)
+    free (line);
+
   return GSASL_AUTHENTICATION_ERROR;
 }





reply via email to

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