This is a technical but very important part. You just clean your ICQLINK using icq_Done (line 219):
icq_Done(&link);
If you used dynamic allocation to allocate your ICQLINK don't forget to clean that as well.