From c9f1585e67717068e82ba22bc498aabf2954c113 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 21 Aug 2013 16:07:25 +0200 Subject: libmount: add reference counter to libmnt_table Signed-off-by: Karel Zak --- libmount/src/tab_parse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libmount/src/tab_parse.c') 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; } -- cgit v1.2.3-55-g7522