aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/losetup.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/util-linux/losetup.c b/util-linux/losetup.c
index b220c9878..b1e4b08b0 100644
--- a/util-linux/losetup.c
+++ b/util-linux/losetup.c
@@ -45,9 +45,11 @@ int losetup_main(int argc, char **argv)
45 bb_perror_nomsg_and_die(); 45 bb_perror_nomsg_and_die();
46 } else if (argc == 1) { 46 } else if (argc == 1) {
47 char *s = query_loop(argv[0]); 47 char *s = query_loop(argv[0]);
48 if (!s) bb_perror_nomsg_and_die(); 48 if (!s)
49 bb_perror_nomsg_and_die();
49 printf("%s: %s\n", argv[0], s); 50 printf("%s: %s\n", argv[0], s);
50 if (ENABLE_FEATURE_CLEAN_UP) free(s); 51 if (ENABLE_FEATURE_CLEAN_UP)
52 free(s);
51 } else { 53 } else {
52 char dev[sizeof(LOOP_NAME"0")] = LOOP_NAME"0"; 54 char dev[sizeof(LOOP_NAME"0")] = LOOP_NAME"0";
53 char c; 55 char c;
@@ -57,7 +59,8 @@ int losetup_main(int argc, char **argv)
57 s = query_loop(dev); 59 s = query_loop(dev);
58 if (s) { 60 if (s) {
59 printf("%s: %s\n", dev, s); 61 printf("%s: %s\n", dev, s);
60 if (ENABLE_FEATURE_CLEAN_UP) free(s); 62 if (ENABLE_FEATURE_CLEAN_UP)
63 free(s);
61 } 64 }
62 } 65 }
63 } 66 }