]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
losetup: fix memory leak [asan]
authorKarel Zak <kzak@redhat.com>
Tue, 8 Mar 2022 12:06:45 +0000 (13:06 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 8 Mar 2022 12:07:28 +0000 (13:07 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/losetup.c

index 09c028b6b4e620fba1a2f7fcdfebb57c34f4cf62..1d81b117ac16d234332fe8a45f9c2b577f71052f 100644 (file)
@@ -239,7 +239,7 @@ static int set_scols_data(struct loopdev_cxt *lc, struct libscols_line *ln)
                        p = loopcxt_get_device(lc);
                        break;
                case COL_BACK_FILE:
-                       p = loopcxt_get_backing_file(lc);
+                       np = loopcxt_get_backing_file(lc);
                        break;
                case COL_OFFSET:
                        if (loopcxt_get_offset(lc, &x) == 0)