]> git.decadent.org.uk Git - nfs-utils.git/commit
sm-notify command: fix a use-after-free bug
authorChuck Lever <chuck.lever@oracle.com>
Wed, 17 Dec 2008 19:42:14 +0000 (14:42 -0500)
committerSteve Dickson <steved@redhat.com>
Wed, 17 Dec 2008 19:42:14 +0000 (14:42 -0500)
commitf846abde5faa4742b4823fa981080b1f5dac66b1
tree52419e78efe6f925a0ae3e06c93f3fbeea1a7a1f
parent3f23f712477df48fd1d57376b65c44bb2a19ec16
sm-notify command: fix a use-after-free bug

The recv_reply() function was referencing host->ai in a freeaddrinfo(3)
call after it had freed @host.

This is not likely to be harmful in a single-threaded user context,
but it's still bad form, and it will get called out if testing
sm-notify with poisoned free memory.  The less noise, the better we
are able to see real problems.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/statd/sm-notify.c