Fix a memory leak associated with using the portmapper.
This might not be reachable from ganesha, but it does matter
for standalone test programs.

Signed-off-by: Marcus Watts <mdw@cohortfs.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix per-request udp memory leak for
req->rq_rtaddr.buf = mem_zalloc(alen);
that's allocated in svc_dg_recv()

Signed-off-by: Marcus Watts <mdw@cohortfs.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Duplex streams are not used by the rendevous transport.
So don't allocate them (they don't appear to be freed...)

Signed-off-by: Marcus Watts <mdw@cohortfs.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Always properly release lock allocated by svc_rqst_lookup_chan()
in svc_rqst_thrd_signal().  Otherwise, the next fix (event shutdown)
will cause a a deadlock here.

Signed-off-by: Marcus Watts <mdw@cohortfs.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Event channel events don't rearm event, so don't turn one-shot mode on.

Signed-off-by: Marcus Watts <mdw@cohortfs.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
When shutting down, release event channel too (it's a resource leak.)

Signed-off-by: Marcus Watts <mdw@cohortfs.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
When allocating xp_ev, make absolutely sure sr_rec is initialized
(I believe I saw an 'uninitialized reference' error on this...)

When freeing xp_ev, make sure it can't be freed again.
(of course, this shouldn't happen...)

Signed-off-by: Marcus Watts <mdw@cohortfs.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix various problems with svc_dg_destroy - avoid calling dodestroy
from dodestroy, don't call svc_rqst_xprt_unregister more
than once, etc.  SVC_XPRT_FLAG_DESTROYING might be redundant with
the rest of this fix, but it makes the guarantee absolute.

Signed-off-by: Marcus Watts <mdw@cohortfs.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix problems with svc_getreq_default().  This isn't used in ganesha
itself, but simple test code constructed with svc_run needs this.

Signed-off-by: Marcus Watts <mdw@cohortfs.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>