Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Mar 2004 08:04:49 -0800 (PST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 49672 for review
Message-ID:  <200403251604.i2PG4n5S059428@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=49672

Change 49672 by rwatson@rwatson_tislabs on 2004/03/25 08:04:30

	Correct bugs in memory allocation introduced in port from Darwin.
	
	Submitted by:	"Ilmar S. Habibulin" <ilmar@watson.org>

Affected files ...

.. //depot/projects/trustedbsd/audit2/sys/security/audit/audit.c#17 edit

Differences ...

==== //depot/projects/trustedbsd/audit2/sys/security/audit/audit.c#17 (text+ko) ====

@@ -1393,7 +1393,7 @@
 	}
 
 	if (*pathp == NULL)
-		pathp = malloc(MAXPATHLEN, M_AUDIT, M_WAITOK);
+		*pathp = malloc(MAXPATHLEN, M_AUDIT, M_WAITOK);
 
 	canon_path(td, upath, *pathp);
 
@@ -1456,7 +1456,7 @@
 	}
 
 	if (*pathp == NULL)
-		pathp = malloc(MAXPATHLEN, M_AUDIT, M_WAITOK);
+		*pathp = malloc(MAXPATHLEN, M_AUDIT, M_WAITOK);
 
 	/*
 	 * Copy the path looked up by the vn_getpath() function.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403251604.i2PG4n5S059428>