ptserver: Tidy malloc handling in readpwd
authorSimon Wilkinson <sxw@your-file-system.com>
Tue, 19 Feb 2013 15:46:52 +0000 (15:46 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 22 Feb 2013 06:20:05 +0000 (22:20 -0800)
commitdf0b2d6775523d12fe18043bf392c80533c7b38a
treed0edc4ca018e00195ab18fd262c8277d0317ed5c
parent7f9f54c9192715af39a9653004807ac31ccef7fb
ptserver: Tidy malloc handling in readpwd

Tidy up the malloc handling in readpwd, so that we don't leak memory
if the user specifies multiple -c arguments. Also avoid assuming that
free(NULL) will always work.

Change-Id: I95f3fe908572cb5be2d30345ccae0a2858622bd5
Reviewed-on: http://gerrit.openafs.org/9178
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/ptserver/readpwd.c