fix error while freeing the configfile-ptr