Fixed memory leak in setcookie()