Re: Bad references
There is no risk at all with a bad referene if you state it correctly.
If you say: X is incompetent and knows nothing about computers. There is a potential risk of libel if very very small.
If you say: 'We would not employ X in a technical role based on an assesment of his skills while he worked for me, there is no risk and it is a more accurate statement.