From 01dd2838b4f60888fc66ccb9aa0f44907d1851a4 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Tue, 8 Mar 2022 13:06:45 +0100
Subject: [PATCH] losetup: fix memory leak [asan]

Signed-off-by: Karel Zak <kzak@redhat.com>
---
 sys-utils/losetup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c
index 09c028b6b4..1d81b117ac 100644
--- a/sys-utils/losetup.c
+++ b/sys-utils/losetup.c
@@ -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)
