diff options
author | Karel Zak | 2013-08-22 11:57:06 +0200 |
---|---|---|
committer | Karel Zak | 2013-08-22 11:57:06 +0200 |
commit | 14104e931e90e224be8139a4a20848cd4001d0ef (patch) | |
tree | 7848a5b5b9a467605965ddb0bf360d92dbd78a4c /libmount/src/tab.c | |
parent | pylibmount: use libmount reference counting (diff) | |
download | kernel-qcow2-util-linux-14104e931e90e224be8139a4a20848cd4001d0ef.tar.gz kernel-qcow2-util-linux-14104e931e90e224be8139a4a20848cd4001d0ef.tar.xz kernel-qcow2-util-linux-14104e931e90e224be8139a4a20848cd4001d0ef.zip |
libmount: cleanup libmnt_fs list after mnt_table_remove_fs()
.. otherwise mnt_free_fs() will try to remove FS from non-existing
list.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/tab.c')
-rw-r--r-- | libmount/src/tab.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libmount/src/tab.c b/libmount/src/tab.c index b1078cf81..d646d6a83 100644 --- a/libmount/src/tab.c +++ b/libmount/src/tab.c @@ -455,7 +455,10 @@ int mnt_table_remove_fs(struct libmnt_table *tb, struct libmnt_fs *fs) if (!tb || !fs) return -EINVAL; + list_del(&fs->ents); + INIT_LIST_HEAD(&fs->ents); /* otherwise FS still points to the list */ + mnt_unref_fs(fs); tb->nents--; return 0; |