示例#1
0
void
free_tpl(
    char *tpl_content
    )
{
    free_file_content(tpl_content);
}
示例#2
0
/**
 * _config_close:
 * @cfg: Configuration file identifier.
 *
 * Close the 'cfg' object, used to access the configuration file.
 * Any change made with the config_set() function call will be written.
 *
 * Returns: 0 on success, -1 otherwise.
 */
int _config_close(config_t *cfg)
{
        int ret = 0;

        if ( cfg->content ) {
                if ( cfg->need_sync )
                        ret = sync_and_free_file_content(cfg);

                if ( ret < 0 || ! cfg->need_sync )
                        free_file_content(cfg);
        }

        free(cfg->filename);
        free(cfg);

        return ret;
}