diff options
author | Karel Zak | 2012-01-26 15:01:01 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-26 15:01:01 +0100 |
commit | d89670b515d00de8de7ac831c0faecb8aacad746 (patch) | |
tree | 9dfc33ca4f67d83c867277fd668069309c53800c /libmount/src/context.c | |
parent | tests: add valgrind to libmount context tests (diff) | |
download | kernel-qcow2-util-linux-d89670b515d00de8de7ac831c0faecb8aacad746.tar.gz kernel-qcow2-util-linux-d89670b515d00de8de7ac831c0faecb8aacad746.tar.xz kernel-qcow2-util-linux-d89670b515d00de8de7ac831c0faecb8aacad746.zip |
libmount: fix context test logic
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context.c')
-rw-r--r-- | libmount/src/context.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |