fix double free var:queue

when dir is not exist , double free or corruption queue