]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/rquotad/rquota_server.c
Fix various issues discovered by Coverity
[nfs-utils.git] / utils / rquotad / rquota_server.c
index 109c94e45cc014fee50a6dce20f000dceefc9cfa..e3715bd933a0769be9f7f9284c73baebe8f7641c 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)) {