]> git.decadent.org.uk Git - nfs-utils.git/commit
rpc.mountd: fix memory leak and error handling in nfsd_fh
authorJeff Layton <jlayton@redhat.com>
Thu, 27 Sep 2007 10:53:43 +0000 (06:53 -0400)
committerNeil Brown <neilb@suse.de>
Fri, 28 Sep 2007 01:39:56 +0000 (11:39 +1000)
commit1992a667c49cdd83ff7d7414a07225fcf34f0ad2
tree9ebb29f19ac00b1cd48483df545c0e8dce8d793c
parent97fed3061fd5c742ebd1f685e3e6dcb62e835b74
rpc.mountd: fix memory leak and error handling in nfsd_fh

nfsd_fh() uses strdup for creating found_path and doesn't check the
return value. It also doesn't free this memory when the function
returns. Check the return value of strdup and return immediately
if it's NULL. Also, free found_path on exit.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
utils/mountd/cache.c