diff --git a/ph7.c b/ph7.c index 8d2dec2..6460b28 100644 --- a/ph7.c +++ b/ph7.c @@ -34900,10 +34900,12 @@ static sxi32 SyOSUtilRandomSeed(void *pBuf,sxu32 nLen,void *pUnused) fd = open("/dev/urandom",O_RDONLY); if (fd >= 0 ){ if( read(fd,zBuf,nLen) > 0 ){ + close(fd); return SXRET_OK; } /* FALL THRU */ } + close(fd); pid = getpid(); SyMemcpy((const void *)&pid,zBuf,SXMIN(nLen,sizeof(pid_t))); if( &zBuf[nLen] - &zBuf[sizeof(pid_t)] >= (int)sizeof(struct timeval) ){