Bug # 397
http://bugs.skysql.com/show_bug.cgi?id=397

Avoid calling free with NULL pointer.