/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to plugins.d/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2018-02-19 21:32:07 UTC
  • mto: (237.7.594 trunk)
  • mto: This revision was merged to the branch mainline in revision 366.
  • Revision ID: teddy@recompile.se-20180219213207-0un0ylegx390pftq
Client bug fixes: Fix file descriptor leaks

* plugin-helpers/mandos-client.c (init_gnutls_global, get_flags):
  Always close files and sockets after they are used.

Show diffs side-by-side

added added

removed removed

Lines of Context:
613
613
        }
614
614
        params.size += (unsigned int)bytes_read;
615
615
      }
 
616
      close(dhpfile);
616
617
      if(params.data == NULL){
617
618
        dhparamsfilename = NULL;
618
619
      }
1655
1656
      perror_plus("ioctl SIOCGIFFLAGS");
1656
1657
      errno = old_errno;
1657
1658
    }
 
1659
    close(s);
1658
1660
    return false;
1659
1661
  }
 
1662
  close(s);
1660
1663
  return true;
1661
1664
}
1662
1665