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