-static void
-osdata_item_clear (struct osdata_item *item)
-{
- if (item->columns != NULL)
- {
- struct osdata_column *col;
- int ix;
-
- for (ix = 0;
- VEC_iterate (osdata_column_s, item->columns,
- ix, col);
- ix++)
- {
- xfree (col->name);
- xfree (col->value);
- }
- VEC_free (osdata_column_s, item->columns);
- item->columns = NULL;
- }
-}
-
-void
-osdata_free (struct osdata *osdata)
-{
- if (osdata == NULL)
- return;
-
- if (osdata->items != NULL)
- {
- struct osdata_item *item;
- int ix;
-
- for (ix = 0;
- VEC_iterate (osdata_item_s, osdata->items,
- ix, item);
- ix++)
- osdata_item_clear (item);
- VEC_free (osdata_item_s, osdata->items);
- }
-
- xfree (osdata);
-}
-
-static void
-osdata_free_cleanup (void *arg)
-{
- struct osdata *osdata = arg;
-
- osdata_free (osdata);
-}
-
-struct cleanup *
-make_cleanup_osdata_free (struct osdata *data)
-{
- return make_cleanup (osdata_free_cleanup, data);
-}
-
-struct osdata *