good for merge On Fri, 2010-05-14 at 09:49 +1000, Angus Salkeld wrote: > Signed-off-by: Angus Salkeld <asalk...@redhat.com> > --- > exec/crypto.c | 7 ++++--- > 1 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/exec/crypto.c b/exec/crypto.c > index 0ae415e..f85f4b9 100644 > --- a/exec/crypto.c > +++ b/exec/crypto.c > @@ -1258,9 +1258,10 @@ static unsigned long rng_nix(unsigned char *buf, > unsigned long len, > > fd = open ("/dev/urandom", O_RDONLY); > > - rb = (unsigned long)read (fd, buf, len); > - > - close (fd); > + if (fd >= 0) { > + rb = (unsigned long)read (fd, buf, len); > + close (fd); > + } > > return (rb); > }
_______________________________________________ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais