From d89670b515d00de8de7ac831c0faecb8aacad746 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 26 Jan 2012 15:01:01 +0100 Subject: libmount: fix context test logic Signed-off-by: Karel Zak --- libmount/src/context.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libmount/src/context.c') diff --git a/libmount/src/context.c b/libmount/src/context.c index ac48fce36..4494ac6c1 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -1997,7 +1997,7 @@ int test_mount(struct libmnt_test *ts, int argc, char *argv[]) mnt_context_set_target(cxt, argv[idx++]); } - /* this is unnecessary -- libmount is able to internaly + /* this is unnecessary! -- libmount is able to internaly * create and manage the lock */ lock = mnt_context_get_lock(cxt); @@ -2010,6 +2010,7 @@ int test_mount(struct libmnt_test *ts, int argc, char *argv[]) else printf("successfully mounted\n"); + lock = NULL; /* because we use atexit lock_fallback */ mnt_free_context(cxt); return rc; } @@ -2064,6 +2065,7 @@ int test_umount(struct libmnt_test *ts, int argc, char *argv[]) else printf("successfully umounted\n"); err: + lock = NULL; /* because we use atexit lock_fallback */ mnt_free_context(cxt); return rc; } -- cgit v1.2.3-55-g7522