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;
 }



_______________________________________________
Gsasl-commit mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gsasl-commit

Reply via email to