]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/rquotad/rquota_server.c
update manpages for showmount and mountd
[nfs-utils.git] / utils / rquotad / rquota_server.c
index 109c94e45cc014fee50a6dce20f000dceefc9cfa..f8bd8f18ab956f1fe47ff3b568f75ecc0c5aeda7 100644 (file)
@@ -201,7 +201,6 @@ getquota_rslt *getquotainfo(int flags, caddr_t *argp, struct svc_req *rqstp)
                                      free(qfpathname);
                                      continue;
                              }
-                             free(qfpathname);
                              lseek(fd, (long) dqoff(id), L_SET);
                              switch (read(fd, &dq_dqb, sizeof(struct dqblk))) {
                              case 0:/* EOF */
@@ -215,6 +214,7 @@ getquota_rslt *getquotainfo(int flags, caddr_t *argp, struct svc_req *rqstp)
                                      break;
                              default:   /* ERROR */
                                      close(fd);
+                                     free(qfpathname);
                                      continue;
                              }
                              close(fd);
@@ -228,6 +228,7 @@ getquota_rslt *getquotainfo(int flags, caddr_t *argp, struct svc_req *rqstp)
                      dqb.dqb_btime = dq_dqb.dqb_btime;
                      dqb.dqb_itime = dq_dqb.dqb_itime;
              }
+             free(qfpathname);
          endmntent(fp);
 
          if (err && (flags & ACTIVE)) {
@@ -261,22 +262,22 @@ getquota_rslt *getquotainfo(int flags, caddr_t *argp, struct svc_req *rqstp)
    return(&result);
 }
 
-getquota_rslt *rquotaproc_getquota_1(getquota_args *argp, struct svc_req *rqstp)
+getquota_rslt *rquotaproc_getquota_1_svc(getquota_args *argp, struct svc_req *rqstp)
 {
    return(getquotainfo(0, (caddr_t *)argp, rqstp));
 }
 
-getquota_rslt *rquotaproc_getactivequota_1(getquota_args *argp, struct svc_req *rqstp)
+getquota_rslt *rquotaproc_getactivequota_1_svc(getquota_args *argp, struct svc_req *rqstp)
 {
    return(getquotainfo(ACTIVE, (caddr_t *)argp, rqstp));
 }
 
-getquota_rslt *rquotaproc_getquota_2(ext_getquota_args *argp, struct svc_req *rqstp)
+getquota_rslt *rquotaproc_getquota_2_svc(ext_getquota_args *argp, struct svc_req *rqstp)
 {
    return(getquotainfo(TYPE_EXTENDED, (caddr_t *)argp, rqstp));
 }
 
-getquota_rslt *rquotaproc_getactivequota_2(ext_getquota_args *argp, struct svc_req *rqstp)
+getquota_rslt *rquotaproc_getactivequota_2_svc(ext_getquota_args *argp, struct svc_req *rqstp)
 {
    return(getquotainfo(TYPE_EXTENDED | ACTIVE, (caddr_t *)argp, rqstp));
 }