diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-12-18 09:27:42 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-12-18 09:27:42 +0200 |
commit | fbd12ed8018a146ca339f684348302d1f85c277d (patch) | |
tree | d94393225bfbbfc7470f9d7f98e6df8dc35ff18f | |
parent | e4c1bb5ac21983de746f5446b3ed564a210d55d4 (diff) | |
download | librpm-tizen-fbd12ed8018a146ca339f684348302d1f85c277d.tar.gz librpm-tizen-fbd12ed8018a146ca339f684348302d1f85c277d.tar.bz2 librpm-tizen-fbd12ed8018a146ca339f684348302d1f85c277d.zip |
Use constfree for rpmdb_s contents for now
- rpmdb_internal is included from several places over the tree
-rw-r--r-- | rpmdb/dbconfig.c | 14 | ||||
-rw-r--r-- | rpmdb/rpmdb.c | 10 | ||||
-rw-r--r-- | rpmdb/sqlite.c | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/rpmdb/dbconfig.c b/rpmdb/dbconfig.c index beb31ba65..edcad48d9 100644 --- a/rpmdb/dbconfig.c +++ b/rpmdb/dbconfig.c @@ -244,14 +244,14 @@ struct poptOption rdbOptions[] = { dbiIndex db3Free(dbiIndex dbi) { if (dbi) { - 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_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_host = _free(dbi->dbi_host); - dbi->dbi_errpfx = _free(dbi->dbi_errpfx); - dbi->dbi_re_source = _free(dbi->dbi_re_source); + dbi->dbi_errpfx = _constfree(dbi->dbi_errpfx); + dbi->dbi_re_source = _constfree(dbi->dbi_re_source); dbi->dbi_stats = _free(dbi->dbi_stats); dbi = _free(dbi); } diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c index 87f83347f..0032eb3f7 100644 --- a/rpmdb/rpmdb.c +++ b/rpmdb/rpmdb.c @@ -815,9 +815,9 @@ int rpmdbClose(rpmdb db) if (xx && rc == 0) rc = xx; db->_dbi[dbix] = NULL; } - db->db_errpfx = _free(db->db_errpfx); - db->db_root = _free(db->db_root); - db->db_home = _free(db->db_home); + db->db_errpfx = _constfree(db->db_errpfx); + db->db_root = _constfree(db->db_root); + db->db_home = _constfree(db->db_home); db->db_bits = PBM_FREE(db->db_bits); db->_dbi = _free(db->_dbi); @@ -906,8 +906,8 @@ rpmdb newRpmdb(const char * root, 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 = _free(db->db_root); - db->db_home = _free(db->db_home); + db->db_root = _constfree(db->db_root); + db->db_home = _constfree(db->db_home); db = _free(db); return NULL; } diff --git a/rpmdb/sqlite.c b/rpmdb/sqlite.c index f7cf853cb..ac2989ed4 100644 --- a/rpmdb/sqlite.c +++ b/rpmdb/sqlite.c @@ -748,7 +748,7 @@ enterChroot(dbi); dbi->dbi_subfile); dbi->dbi_stats = _free(dbi->dbi_stats); - dbi->dbi_file = _free(dbi->dbi_file); + dbi->dbi_file = _constfree(dbi->dbi_file); dbi->dbi_db = _free(dbi->dbi_db); leaveChroot(dbi); |