Make sure an error condition is returned if, for some reason, the file

couldn't be opened.
This commit is contained in:
Richard Levitte 2000-03-19 19:10:03 +00:00
parent f3f3cc0cca
commit 87b89b799f

View File

@ -163,7 +163,11 @@ int RAND_write_file(const char *file)
out = fopen(file,"wb");
#endif
}
if (out == NULL) goto err;
if (out == NULL)
{
err=1;
goto err;
}
#ifndef NO_CHMOD
chmod(file,0600);
#endif