]> sourceware.org Git - lvm2.git/commit
Add dm_pool_strdup to allocate memory and copy a tag in {lv|vg}_change_tag()
authorDave Wysochanski <dwysocha@redhat.com>
Wed, 24 Feb 2010 18:15:57 +0000 (18:15 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Wed, 24 Feb 2010 18:15:57 +0000 (18:15 +0000)
commit610cd1a5313f5d8e402b85ffe8366c1f5e57e189
treeac2330b38486b562fdca9e7d863be3ef31236beb
parent08d06030dc447368e0e41f690e7a5591ca7880ef
Add dm_pool_strdup to allocate memory and copy a tag in {lv|vg}_change_tag()

We need to allocate memory for the tag and copy the tag value before we
add it to the list of tags.  We could put this inside lvm2app since the
tools keep their memory around until vg_write/vg_commit is called, but
we put it inside the internal library to minimize code in lvm2app.
We need to copy the tag passed in by the caller to ensure the lifetime of
the memory until the {vg|lv} handle is released.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
lib/metadata/metadata.c
This page took 0.037691 seconds and 5 git commands to generate.