Fixes from coverity scan in the file api.c.
Before creating any new configure files (.conf) read the CONF_FILES_README.md