]> git.michaelhowe.org Git - packages/o/openafs.git/commit
libafscp: Fix leak when afscp_ResolvPath errors
authorSimon Wilkinson <sxw@your-file-system.com>
Tue, 19 Feb 2013 17:28:12 +0000 (17:28 +0000)
committerDerrick Brashear <shadow@your-file-system.com>
Fri, 22 Feb 2013 21:03:26 +0000 (13:03 -0800)
commitf82acb79f25ab97b565c74ef64a7d3573a13b682
treec5c080568955318cc7d3f2705976a1472bcb9e57
parent860c34ba938602387f78c10c2f548fb8a523a9cd
libafscp: Fix leak when afscp_ResolvPath errors

If afscp_DefaultCell fails, then afscp_ResolvPath returns without
freeing the memory allocated to 'p' by strdup.

Fix this by adding a free() in the appropriate place.

Caught by clang-analyzer

Change-Id: Ic2691d209c913cd600d9a9a1ebb4614dff35aa3b
Reviewed-on: http://gerrit.openafs.org/9195
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/libafscp/afscp_dir.c