Btrfs - Fix memory leak in btrfs_init_new_device()
PATCH 1/1 Btrfs - Fix memory leak in btrfs_init_new_device()
Memory allocated by calling kstrdup() should be freed.
Signed-off-by Ilya Dryomov <[email protected]>
--- fs/btrfs/volumes.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
fs/btrfs/volumes.c +1 -0
@@ -1601,6 +1601,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) ret =find_next_devid (root, &device->devid);if (ret) { +kfree (device->name);kfree (device); goto error; }
Signature · 1 line
1.7.2.3