]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: don't initialize variable twice (#2714)
authorThorsten Kukuk <kukuk@suse.com>
Tue, 26 Mar 2024 13:00:57 +0000 (14:00 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 2 Apr 2024 11:00:26 +0000 (13:00 +0200)
Signed-off-by: Thorsten Kukuk <kukuk@suse.com>
(cherry picked from commit 5509e9b18a4b956b910fff772b9f88880ae28ca1)
(cherry picked from commit 2d8ca2cf86309adbeccd07cba36c753e28d12a1b)

libmount/src/hook_loopdev.c

index 8c8f7f2187328e2f8bb8ae231ab75e8d562822ec..12c2a7cce208e8ac54e7805a85b83b7a4b3a1d65 100644 (file)
@@ -140,10 +140,6 @@ static int setup_loopdev(struct libmnt_context *cxt,
 
        DBG(LOOP, ul_debugobj(cxt, "trying to setup device for %s", backing_file));
 
-       ol = mnt_context_get_optlist(cxt);
-       if (!ol)
-               return -ENOMEM;
-
        if (mnt_optlist_is_rdonly(ol)) {
                DBG(LOOP, ul_debugobj(cxt, "enabling READ-ONLY flag"));
                lo_flags |= LO_FLAGS_READ_ONLY;