Modified mapfile.c for ticket #4568.
Merge branch 'master' of git://github.com/mapserver/mapserver into outputformat
check refcount is zero before freeing (fix double free in php mapscript)