fixed double free bug caused by two fclose() on fd
Merge pull request #1 from ivn/master

fixed double free bug caused by two fclose() on fd