]> 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)
committerThorsten Kukuk <kukuk@suse.com>
Tue, 26 Mar 2024 13:00:57 +0000 (14:00 +0100)
Signed-off-by: Thorsten Kukuk <kukuk@suse.com>
libmount/src/hook_loopdev.c

index e2114b0cbebe26e4ac8b8ac8a1cbc3e37bc8b31a..597b9339ac09cac44cd4a03774ea77471fb1953a 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;