+2005-05-11 Daniel P. Ottavio <dottavio@ic.sunysb.edu>
+
+ * amd/amd.c (main) : fixed memory leak detected by valgrind
+
+ * amd/info_ldap.c (amu_ldap_init) : fixed memory leak detected by
+ valgrind
+
2005-05-11 Erez Zadok <ezk@cs.sunysb.edu>
* m4/macros/{check_checkmount_style.m4, check_mnttab_style.m4,
* SUCH DAMAGE.
*
*
- * $Id: amd.c,v 1.35 2005/03/08 06:05:33 ezk Exp $
+ * $Id: amd.c,v 1.36 2005/05/12 23:01:25 ottavio Exp $
*
*/
int
main(int argc, char *argv[])
{
- char *domdot, *verstr;
+ char *domdot, *verstr, *vertmp;
int ppid = 0;
int error;
char *progname = NULL; /* "amd" */
/*
* Log version information.
*/
- verstr = strtok(get_version_string(), "\n");
+ vertmp = get_version_string();
+ verstr = strtok(vertmp, "\n");
plog(XLOG_INFO, "AM-UTILS VERSION INFORMATION:");
while (verstr) {
plog(XLOG_INFO, "%s", verstr);
verstr = strtok(NULL, "\n");
}
+ XFREE(vertmp);
/*
* Get our own IP address so that we can mount the automounter. We pass
* SUCH DAMAGE.
*
*
- * $Id: info_ldap.c,v 1.24 2005/01/03 20:56:45 ezk Exp $
+ * $Id: info_ldap.c,v 1.25 2005/05/12 23:01:25 ottavio Exp $
*
*/
if (aldh->hostent == NULL) {
plog(XLOG_USER, "Unable to parse hostport %s for ldap map %s",
gopt.ldap_hostports ? gopt.ldap_hostports : "(null)", map);
+ XFREE(creds);
+ XFREE(aldh);
return (ENOENT);
}
creds->who = "";