summary refs log tree commit diff
path: root/nis/nis_callback.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nis_callback.c')
-rw-r--r--nis/nis_callback.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/nis/nis_callback.c b/nis/nis_callback.c
index cf96b42dcf..904e927055 100644
--- a/nis/nis_callback.c
+++ b/nis/nis_callback.c
@@ -220,10 +220,12 @@ internal_nis_do_callback (struct dir_binding *bptr, netobj *cookie,
       switch (i = __poll (my_pollfd, svc_max_pollfd, 25*1000))
         {
 	case -1:
+	  free (my_pollfd);
 	  if (errno == EINTR)
 	    continue;
 	  return NIS_CBERROR;
 	case 0:
+	  free (my_pollfd);
 	  /* See if callback 'thread' in the server is still alive. */
 	  memset ((char *) &cb_is_running, 0, sizeof (cb_is_running));
 	  if (clnt_call (bptr->clnt, NIS_CALLBACK, (xdrproc_t) xdr_netobj,
@@ -239,6 +241,7 @@ internal_nis_do_callback (struct dir_binding *bptr, netobj *cookie,
 	  break;
 	default:
 	  svc_getreq_poll (my_pollfd, i);
+	  free (my_pollfd);
 	  if (data->nomore)
 	    return data->result;
 	}