You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
965 B

  1. --- a/src/chilli.c
  2. +++ b/src/chilli.c
  3. @@ -4297,8 +4297,10 @@ static int chilliauth_cb(struct radius_t
  4. while (!differ && r1 > 0 && r2 > 0);
  5. }
  6. - if (newfd) safe_close(newfd); newfd=0;
  7. - if (oldfd) safe_close(oldfd); oldfd=0;
  8. + if (newfd) safe_close(newfd);
  9. + newfd=0;
  10. + if (oldfd) safe_close(oldfd);
  11. + oldfd=0;
  12. if (differ) {
  13. log_dbg("Writing out new hs.conf file with administraive-user settings");
  14. --- a/src/redir.c
  15. +++ b/src/redir.c
  16. @@ -3176,9 +3176,11 @@ pid_t redir_fork(int in, int out) {
  17. }
  18. #if defined(F_DUPFD)
  19. - if (fcntl(in,F_GETFL,0) == -1) return -1; safe_close(0);
  20. + if (fcntl(in,F_GETFL,0) == -1) return -1;
  21. + safe_close(0);
  22. if (fcntl(in,F_DUPFD,0) == -1) return -1;
  23. - if (fcntl(out,F_GETFL,1) == -1) return -1; safe_close(1);
  24. + if (fcntl(out,F_GETFL,1) == -1) return -1;
  25. + safe_close(1);
  26. if (fcntl(out,F_DUPFD,1) == -1) return -1;
  27. #else
  28. if (dup2(in,0) == -1) return -1;