* nis/nis_callback.c (__nis_create_callback): Always call xdr_free

for cleanup when cb!=NULL [Coverity CID 233].
This commit is contained in:
Ulrich Drepper 2006-05-25 15:52:21 +00:00
parent 07bfff20c7
commit 6bcb494a99
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2006-05-25 Ulrich Drepper <drepper@redhat.com>
* nis/nis_callback.c (__nis_create_callback): Always call xdr_free
for cleanup when cb!=NULL [Coverity CID 233].
2006-05-24 Ulrich Drepper <drepper@redhat.com> 2006-05-24 Ulrich Drepper <drepper@redhat.com>
[BZ #2693] [BZ #2693]

View File

@ -360,8 +360,7 @@ __nis_create_callback (int (*callback) (const_nis_name, const nis_object *,
{ {
if (cb->xprt) if (cb->xprt)
svc_destroy (cb->xprt); svc_destroy (cb->xprt);
if (cb->serv) xdr_free ((xdrproc_t) _xdr_nis_server, (char *) cb->serv);
xdr_free ((xdrproc_t) _xdr_nis_server, (char *) cb->serv);
free (cb); free (cb);
} }
if (!nomsg) if (!nomsg)