X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Frquotad%2Frquota_server.c;h=f8bd8f18ab956f1fe47ff3b568f75ecc0c5aeda7;hp=109c94e45cc014fee50a6dce20f000dceefc9cfa;hb=a5f020dda1a93657eae1b297a67d054269a3ef0c;hpb=a021f1f459d8fd471123848c8f83a73a5fc1629e diff --git a/utils/rquotad/rquota_server.c b/utils/rquotad/rquota_server.c index 109c94e..f8bd8f1 100644 --- a/utils/rquotad/rquota_server.c +++ b/utils/rquotad/rquota_server.c @@ -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)); }