]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
- add stringpool_free()
authorMichael Schroeder <mls@suse.de>
Mon, 25 Aug 2008 13:12:59 +0000 (13:12 +0000)
committerMichael Schroeder <mls@suse.de>
Mon, 25 Aug 2008 13:12:59 +0000 (13:12 +0000)
src/pool.c
src/strpool.c
src/strpool.h

index d14c27fb9fddede0dafc0e3ba74eb26cc2f02877..db9ec8dc31efb7ed5bd8467c4019e239de8f5693 100644 (file)
@@ -76,8 +76,7 @@ pool_free(Pool *pool)
   repo_freeallrepos(pool, 1);
   sat_free(pool->id2arch);
   sat_free(pool->solvables);
-  sat_free(pool->ss.stringspace);
-  sat_free(pool->ss.strings);
+  stringpool_free(&pool->ss);
   sat_free(pool->rels);
   queue_free(&pool->vendormap);
   for (i = 0; i < POOL_TMPSPACEBUF; i++)
index 79e450b4e53c0c73a600071b90a53ad311b4d28a..2956a7573271dc391fdecb33f1f932b6fe88531f 100644 (file)
@@ -38,6 +38,14 @@ stringpool_init(Stringpool *ss, const char *strs[])
   ss->nstrings = count;
 }
 
+void
+stringpool_free(Stringpool *ss)
+{
+  sat_free(ss->strings);
+  sat_free(ss->stringspace);
+  sat_free(ss->stringhashtbl);
+}
+
 void
 stringpool_init_empty(Stringpool *ss)
 {
index dcab2ae99dd4f4b47f9feed105c8d549bbcf2f8c..59e269fc89d9d27fb83cb5337e16935399762156 100644 (file)
@@ -27,6 +27,7 @@ struct _Stringpool
 void stringpool_init(Stringpool *ss, const char *strs[]);
 void stringpool_init_empty(Stringpool *ss);
 void stringpool_clone(Stringpool *ss, Stringpool *from);
+void stringpool_free(Stringpool *ss);
 
 Id stringpool_str2id (Stringpool *ss, const char *str, int create);
 Id stringpool_strn2id (Stringpool *ss, const char *str, unsigned int len, int create);