*** Audits of memory usage ***

Allocators:

File:		Latest audit:		strdup	strjoi	strjov	strspl	strcon

chage		2003-01-18 (tao)	-	-	-	2/ok	-
chfn		2003-01-18 (tao)	11/ok	1/ok	-	-	-
chgroup		2003-01-18 (tao)	-	-	-	4/ok	-
chgrpmem	2003-01-18 (tao)	-	-	-	8/ok	-
chsh		2003-01-18 (tao)	2/ok	-	-	-	-
chuser		2003-01-18 (tao)	-	-	3/ok	7/ok	-
cppw		2003-01-18 (tao)	-	-	-	-	-
gshadow		2003-01-10 (tao)	-	-	-	-	-
lsage		2003-01-10 (tao)	-	-	-	4/ok	-
lsgroup		2003-01-10 (tao)	-	-	-	3/ok	-
lsuser		2003-01-10 (tao)	1/ok	-	-	4/ok	-
misc		2003-01-10 (tao)	5/ok	-	-	-	-
mkgroup		2003-01-21 (tao)	-	-	-	2/ok	-
mkuser		2003-01-21 (tao)
sysutils	Not yet audited
rmgroup		2003-01-18 (tao)	-	-	-	1/ok	-
rmuser		2003-01-18 (tao)	-	-	3/ok	4/ok	-
vipw		2003-01-18 (tao)	3/ok	-	-	-	1/ok


Allocators (continued):

File:		Latest audit:		inpstr	splitg	getalu	getalg	getuna

chage		2003-01-18 (tao)	-	-	1/ok	-	-
chfn		2003-01-18 (tao)	5/ok	1/ok	-	-	1/ok
chgroup		2003-01-18 (tao)	-	-	-	1/ok	-
chgrpmem	2003-01-18 (tao)	-	-	-	1/ok	-
chsh		2003-01-18 (tao)	1/ok	-	-	-	1/ok
chuser		2003-01-18 (tao)	-	-	1/ok	-	-
cppw		2003-01-18 (tao)	-	-	-	-	-
gshadow		2003-01-10 (tao)	-	-	-	-	-
lsage		2003-01-10 (tao)	-	-	1/ok	-	1/ok
lsgroup		2003-01-10 (tao)	-	-	-	1/ok	-
lsuser		2003-01-10 (tao)	-	1/ok	1/ok	-	-
misc		2003-01-10 (tao)	-	-	-	-	-
mkgroup		2003-01-18 (tao)	-	-	-	-	-
mkuser		2003-01-21 (tao)
sysutils	Not yet audited
rmgroup		2003-01-18 (tao)	-	-	-	-	-
rmuser		2003-01-18 (tao)	-	-	-	-	-
vipw		2003-01-18 (tao)	-	-	-	-	-


Allocators (continued):

File:		Latest audit:		getgna	arrcut	arruni	parse	datstr

chage		2003-01-18 (tao)	-	-	-	-	-
chfn		2003-01-18 (tao)	-	-	-	-	-
chgroup		2003-01-18 (tao)	-	-	-	1/ok	-
chgrpmem	2003-01-18 (tao)	-	3/ok	3/ok	-	-
chsh		2003-01-18 (tao)	-	-	-	-	-
chuser		2003-01-18 (tao)	-	-	-	1/ok	-
cppw		2003-01-18 (tao)	-	-	-	-	-
gshadow		2003-01-09 (tao)	-	-	-	-	-
lsage		2003-01-10 (tao)	-	-	-	-	2/ok
lsgroup		2003-01-10 (tao)	-	-	-	-	-
lsuser		2003-01-10 (tao)	1/ok	-	-	-	-
misc		2003-01-09 (tao)	-	-	-	-	-
mkgroup		2003-01-18 (tao)	-	-	-	1/ok	-
mkuser		2003-01-21 (tao)
sysutils	Not yet audited
rmgroup		2003-01-18 (tao)	-	-	-	-	-
rmuser		2003-01-18 (tao)	-	-	-	-	-
vipw		2003-01-18 (tao)	-	-	-	-	-


Allocators (continued):

File:		Latest audit:		getgpm	getgra	getgrm	adduni	listrm

chage		2003-01-18 (tao)	-	-	-	-	-
chfn		2003-01-18 (tao)	-	-	-	-	-
chgroup		2003-01-18 (tao)	-	-	-	-	-
chgrpmem	2003-01-18 (tao)	-	-	-	-	-
chsh		2003-01-18 (tao)	-	-	-	-	-
chuser		2003-01-18 (tao)	-	-	-	3/ok	3/ok
cppw		2003-01-18 (tao)	-	-	-	-	-
gshadow		2003-01-09 (tao)	-	-	-	-	-
lsage		2003-01-10 (tao)	-	-	-	-	-
lsgroup		2003-01-10 (tao)	-	1/ok	1/ok	-	-
lsuser		2003-01-10 (tao)	-	-	-	-	-
misc		2003-01-09 (tao)	-	-	-	-	-
mkgroup		2003-01-18 (tao)	-	-	-	-	-
mkuser		2003-01-21 (tao)
sysutils	Not yet audited
rmgroup		2003-01-18 (tao)	1/ok	-	-	-	-
rmuser		2003-01-18 (tao)	-	-	-	-	-
vipw		2003-01-18 (tao)	-	-	-	-	-


Allocators (continued):

File:		Latest audit:		create	joing	calloc	malloc	realloc	

chage		2003-01-18 (tao)	2/ok	-	-	-	-	
chfn		2003-01-18 (tao)	2/ok	-	-	-	-	
chgroup		2003-01-18 (tao)	4/ok	-	-	-	-	
chgrpmem	2003-01-18 (tao)	4/ok	-	-	-	-	
chsh		2003-01-18 (tao)	2/ok	-	-	-	-	
chuser		2003-01-21 (tao)	8/ok	1/ok	-	-	-
cppw		2003-01-18 (tao)	2/ok	-	-	-	-	
gshadow		2003-01-09 (tao)	-	-	-	-	-	
lsage		2003-01-10 (tao)	-	-	-	-	-
lsgroup		2003-01-10 (tao)	-	-	-	-	-
lsuser		2003-01-10 (tao)	-	-	-	-	-
misc		2003-01-09 (tao)	-	-	4/ok	-	2/ok
mkgroup		2003-01-18 (tao)	4/ok	-	-	-	-
mkuser		2003-01-21 (tao)
sysutils	Not yet audited
rmgroup		2003-01-18 (tao)	4/ok	-	-	-	-	
rmuser		2003-01-18 (tao)	8/ok	-	-	-	-	
vipw		2003-01-18 (tao)	2/ok	-	-	-	-	


Deallocators:

File:		Latest audit:		free	strfrv

chage		2003-01-18 (tao)	3/ok	1/ok
chfn		2003-01-18 (tao)	13/ok	1/ok
chgroup		2003-01-18 (tao)	10/ok	3/ok
chgrpmem	2003-01-18 (tao)	7/ok	13/ok
chsh		2003-01-18 (tao)	5/ok	-
chuser		2003-01-18 (tao)	29/ok	9/ok
cppw		2003-01-18 (tao)	2/ok	-
gshadow		2003-01-10 (tao)	-	-
lsage		2003-01-10 (tao)	4/ok	2/ok
lsgroup		2003-01-10 (tao)	4/ok	2/ok
lsuser		2003-01-10 (tao)	9/fix	5/fix
misc		2003-01-10 (tao)	2/ok	-
mkgroup		2003-01-21 (tao)	8/ok	2/ok
mkuser		2003-01-21 (tao)
sysutils	Not yet audited
rmgroup		2003-01-18 (tao)	5/ok	1/ok
rmuser		2003-01-18 (tao)	14/ok	7/ok
vipw		2003-01-18 (tao)	4/ok	-


Most function-names have been abbreviated.
See retvalaudit.txt for their full names.


Guidelines:

All strings that are freed somewhere in the program should
start out with a value of NULL.

All constant strings should be marked as such.

Allocating functions (allocators) should check for a NULL
return value, and abort in a sane manner on failure.

parse_key_pairs is an exception; it should check for status,
and all strings it possibly have allocated should be freed
at exit from the program.

Deallocating functions (deallocators) should exist for all
possible paths for the allocators.

If deallocation takes place in a non-exit path, the pointer
should be NULL:ed after being freed.

This goes for invalidated pointers too; for instance FILE pointers.

Legend:

-	Function is not used in this file
ok	Everything was ok, no changes necessary
fix	Something was wrong, problem fixed
nof	Something was wrong, problem NOT fixed
	/* FIXME Leak! */ added to the file above the offending line
???	Something suspicious; this may or may not be a problem
	/* XXX Leak? XXX */ added to the file above the offendling line
xxx	Something else that is wrong; not a leak
	/* XXX <explanation> XXX */ added to the file above the offending line
