diff options
author | David Teigland <teigland@redhat.com> | 2017-08-28 13:37:51 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2017-10-11 10:48:37 -0500 |
commit | 85a2eb278097f89388ebbf4ca2113865afd761bd (patch) | |
tree | eecd637de88ae9490e1a70b9cec246d178aa8e73 | |
parent | 5cbb2c8da140f4f8b2c6c31573e28226ba7c52e2 (diff) | |
download | lvm2-85a2eb278097f89388ebbf4ca2113865afd761bd.tar.gz |
lvmetad_vg_lookup: use fid ref_count to fix unwanted free
-rw-r--r-- | lib/cache/lvmetad.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c index a8827ac6e..47eb5f62a 100644 --- a/lib/cache/lvmetad.c +++ b/lib/cache/lvmetad.c @@ -1097,7 +1097,9 @@ struct volume_group *lvmetad_vg_lookup(struct cmd_context *cmd, const char *vgna vg = NULL; goto out; } + fid->ref_count++; release_vg(vg); + fid->ref_count--; fmt->ops->destroy_instance(fid); vg = vg2; fid = vg2->fid; |