dbiIndex db3Free(dbiIndex dbi)
{
if (dbi) {
- dbi->dbi_root = _constfree(dbi->dbi_root);
- dbi->dbi_home = _constfree(dbi->dbi_home);
- dbi->dbi_file = _constfree(dbi->dbi_file);
- dbi->dbi_subfile = _constfree(dbi->dbi_subfile);
- dbi->dbi_tmpdir = _constfree(dbi->dbi_tmpdir);
+ dbi->dbi_root = _free(dbi->dbi_root);
+ dbi->dbi_home = _free(dbi->dbi_home);
+ dbi->dbi_file = _free(dbi->dbi_file);
+ dbi->dbi_subfile = _free(dbi->dbi_subfile);
+ dbi->dbi_tmpdir = _free(dbi->dbi_tmpdir);
dbi->dbi_host = _free(dbi->dbi_host);
- dbi->dbi_errpfx = _constfree(dbi->dbi_errpfx);
- dbi->dbi_re_source = _constfree(dbi->dbi_re_source);
+ dbi->dbi_errpfx = _free(dbi->dbi_errpfx);
+ dbi->dbi_re_source = _free(dbi->dbi_re_source);
dbi->dbi_stats = _free(dbi->dbi_stats);
dbi = _free(dbi);
}
for (ext = exts; ext != NULL && ext->type != HEADER_EXT_LAST;
ext = (ext->type == HEADER_EXT_MORE ? ext->u.more : ext+1))
{
- if (ec[i].freeit) ec[i].data = _constfree(ec[i].data);
+ if (ec[i].freeit) ec[i].data = _free(ec[i].data);
i++;
}
type == RPM_STRING_ARRAY_TYPE ||
type == RPM_I18NSTRING_TYPE ||
type == RPM_BIN_TYPE)
- free(data); /* XXX _constfree() */
+ free(data); /* XXX _free() */
}
return NULL;
}
if (xx && rc == 0) rc = xx;
db->_dbi[dbix] = NULL;
}
- db->db_errpfx = _constfree(db->db_errpfx);
- db->db_root = _constfree(db->db_root);
- db->db_home = _constfree(db->db_home);
+ db->db_errpfx = _free(db->db_errpfx);
+ db->db_root = _free(db->db_root);
+ db->db_home = _free(db->db_home);
db->db_bits = PBM_FREE(db->db_bits);
db->_dbi = _free(db->_dbi);
db->db_home = rpmGetPath( (home && *home ? home : _DB_HOME), NULL);
if (!(db->db_home && db->db_home[0] != '%')) {
rpmlog(RPMLOG_ERR, _("no dbpath has been set\n"));
- db->db_root = _constfree(db->db_root);
- db->db_home = _constfree(db->db_home);
+ db->db_root = _free(db->db_root);
+ db->db_home = _free(db->db_home);
db = _free(db);
return NULL;
}
* Describes an index database (implemented on Berkeley db3 functionality).
*/
struct _dbiIndex {
- const char * dbi_root; /*!< chroot(2) component of path */
- const char * dbi_home; /*!< directory component of path */
- const char * dbi_file; /*!< file component of path */
- const char * dbi_subfile;
- const char * dbi_tmpdir; /*!< temporary directory */
+ char * dbi_root; /*!< chroot(2) component of path */
+ char * dbi_home; /*!< directory component of path */
+ char * dbi_file; /*!< file component of path */
+ char * dbi_subfile;
+ char * dbi_tmpdir; /*!< temporary directory */
int dbi_ecflags; /*!< db_env_create flags */
int dbi_cflags; /*!< db_create flags */
/* XXX db-4.3.14 adds dbenv as 1st arg. */
void (*db_errcall) (void * dbenv, const char *db_errpfx, char *buffer);
FILE * dbi_errfile;
- const char * dbi_errpfx;
+ char * dbi_errpfx;
int dbi_verbose;
int dbi_region_init;
int dbi_tas_spins;
int dbi_re_delim;
unsigned int dbi_re_len;
int dbi_re_pad;
- const char * dbi_re_source;
+ char * dbi_re_source;
/* queue access parameters */
unsigned int dbi_q_extentsize;
* Describes the collection of index databases used by rpm.
*/
struct rpmdb_s {
- const char * db_root;/*!< path prefix */
- const char * db_home;/*!< directory path */
+ char * db_root;/*!< path prefix */
+ char * db_home;/*!< directory path */
int db_flags;
int db_mode; /*!< open mode */
int db_perms; /*!< open permissions */
int db_api; /*!< Berkeley API type */
- const char * db_errpfx;
+ char * db_errpfx;
int db_remove_env;
int db_filter_dups;
int db_chrootDone; /*!< If chroot(2) done, ignore db_root. */
continue;
ht->buckets[i] = NULL;
if (ht->keySize > 0)
- b->key = _constfree(b->key);
+ b->key = _free(b->key);
do {
n = b->next;
if (b->data) {
if (ht->freeData)
- *b->data = _constfree(*b->data);
+ *b->data = _free(*b->data);
b->data = _free(b->data);
}
b = _free(b);
dbi->dbi_subfile);
dbi->dbi_stats = _free(dbi->dbi_stats);
- dbi->dbi_file = _constfree(dbi->dbi_file);
+ dbi->dbi_file = _free(dbi->dbi_file);
dbi->dbi_db = _free(dbi->dbi_db);
leaveChroot(dbi);
extern const struct _dbiVec sqlitevec;
char * urlfn = NULL;
- const char * root;
- const char * home;
+ char * root;
+ char * home;
const char * dbhome;
const char * dbfile;
char * dbfname;