diff options
| author | Thomas Weißschuh <thomas@t-8ch.de> | 2023-09-27 20:37:22 +0200 |
|---|---|---|
| committer | Thomas Weißschuh <thomas@t-8ch.de> | 2023-10-01 14:08:49 +0200 |
| commit | d36306a560fd6d747e18ab22fc1279f4a373f43d (patch) | |
| tree | 1f9f46230080d2b0176f16de020f4b1450e2a0d5 /libmount/src | |
| parent | d3278188954e1b710ede9541395e0abf3f6b2a14 (diff) | |
| download | util-linux-d36306a560fd6d747e18ab22fc1279f4a373f43d.tar.gz | |
libmount: (tab) avoid leaking memory allocated in loop
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, 1 insertions, 0 deletions
diff --git a/libmount/src/tab.c b/libmount/src/tab.c index 60bef8b2d1..c6be5369e3 100644 --- a/libmount/src/tab.c +++ b/libmount/src/tab.c @@ -1856,6 +1856,7 @@ 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; |
