diff options
author | Karel Zak | 2013-08-21 16:07:25 +0200 |
---|---|---|
committer | Karel Zak | 2013-08-21 16:07:25 +0200 |
commit | c9f1585e67717068e82ba22bc498aabf2954c113 (patch) | |
tree | 01f996b217aef1f2efbf235667a16f7de5a5c96e /libmount/src/tab_parse.c | |
parent | misc: use libmnt_cache reference counting (diff) | |
download | kernel-qcow2-util-linux-c9f1585e67717068e82ba22bc498aabf2954c113.tar.gz kernel-qcow2-util-linux-c9f1585e67717068e82ba22bc498aabf2954c113.tar.xz kernel-qcow2-util-linux-c9f1585e67717068e82ba22bc498aabf2954c113.zip |
libmount: add reference counter to libmnt_table
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/tab_parse.c')
-rw-r--r-- | libmount/src/tab_parse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c index e31dac8c2..532f0ec04 100644 --- a/libmount/src/tab_parse.c +++ b/libmount/src/tab_parse.c @@ -821,7 +821,7 @@ struct libmnt_table *__mnt_new_table_from_file(const char *filename, int fmt) if (tb) { tb->fmt = fmt; if (mnt_table_parse_file(tb, filename) != 0) { - mnt_free_table(tb); + mnt_unref_table(tb); tb = NULL; } } @@ -860,7 +860,7 @@ struct libmnt_table *mnt_new_table_from_dir(const char *dirname) return NULL; tb = mnt_new_table(); if (tb && mnt_table_parse_dir(tb, dirname) != 0) { - mnt_free_table(tb); + mnt_unref_table(tb); tb = NULL; } return tb; @@ -1103,6 +1103,6 @@ int mnt_table_parse_mtab(struct libmnt_table *tb, const char *filename) mnt_table_merge_user_fs(tb, u_fs); } - mnt_free_table(u_tb); + mnt_unref_table(u_tb); return 0; } |