diff options
| author | Thomas Weißschuh <thomas@t-8ch.de> | 2023-10-04 17:21:47 +0200 |
|---|---|---|
| committer | Thomas Weißschuh <thomas@t-8ch.de> | 2023-10-04 17:21:47 +0200 |
| commit | 44fa7b032e182fe8a58c699f64c3474ffa5f7abf (patch) | |
| tree | 01fdd7e3f3e689d9ade3bbfea0a6b07d9a34fa25 /libmount/src | |
| parent | c38162bf27028a61f5cbea8866faa626f01e60d9 (diff) | |
| download | util-linux-44fa7b032e182fe8a58c699f64c3474ffa5f7abf.tar.gz | |
Revert "libmount: (tab) avoid leaking memory allocated in loop"
coverity claims that this is now a use-after-free.
Let's revert the original change and make the code clearer before trying
another fix.
This reverts commit d36306a560fd6d747e18ab22fc1279f4a373f43d.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Diffstat (limited to 'libmount/src')
| -rw-r--r-- | libmount/src/tab.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/libmount/src/tab.c b/libmount/src/tab.c index c6be5369e3..60bef8b2d1 100644 --- a/libmount/src/tab.c +++ b/libmount/src/tab.c @@ -1856,7 +1856,6 @@ int __mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_f if (!*p) tgt = tgt_prefix; /* target is '/' */ else { - free(tgt_buf); if (asprintf(&tgt_buf, "%s/%s", tgt_prefix, p) <= 0) { rc = -ENOMEM; goto done; |
