svn commit: lorikeet r49 - in trunk/heimdal/lib/hdb: .

abartlet at samba.org abartlet at samba.org
Mon Sep 6 06:59:32 GMT 2004


Author: abartlet
Date: 2004-09-06 06:59:32 +0000 (Mon, 06 Sep 2004)
New Revision: 49

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=lorikeet&path=/trunk/heimdal/lib/hdb&rev=49&nolog=1

Log:
Fix memory leak, and don't return stack variables.

(in the string2key code)

Andrew Bartlett

Modified:
   trunk/heimdal/lib/hdb/keys.c


Changeset:
Modified: trunk/heimdal/lib/hdb/keys.c
===================================================================
--- trunk/heimdal/lib/hdb/keys.c	2004-09-06 02:56:49 UTC (rev 48)
+++ trunk/heimdal/lib/hdb/keys.c	2004-09-06 06:59:32 UTC (rev 49)
@@ -156,7 +156,7 @@
 	    /* if there is a final string, use it as the string to
 	       salt with, this is mostly useful with null salt for
 	       v4 compat, and a cell name for afs compat */
-	    salt->saltvalue.data = buf[i];
+	    salt->saltvalue.data = strdup(buf[i]);
 	    salt->saltvalue.length = strlen(buf[i]);
 	}
     }
@@ -324,6 +324,7 @@
 		}
 	    }
 	}
+	krb5_free_salt(context, salt);
 	free(enctypes);
     }
     



More information about the samba-cvs mailing list