From 186ae367af232e0c8faa43abad07085d5787071c Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 1 Apr 2011 15:35:09 +0100 Subject: [PATCH] * grub-core/disk/loopback.c (grub_cmd_loopback): Fix a memory leak when replacing an existing device. --- ChangeLog | 5 +++++ grub-core/disk/loopback.c | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 044be9d5c..512b61cac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-04-01 Colin Watson + + * grub-core/disk/loopback.c (grub_cmd_loopback): Fix a memory leak + when replacing an existing device. + 2011-04-01 Vladimir Serbinenko Fix incorrect types in jfs.c. This enables >2TiB disks and fixes some diff --git a/grub-core/disk/loopback.c b/grub-core/disk/loopback.c index b05940a4a..02e6c164f 100644 --- a/grub-core/disk/loopback.c +++ b/grub-core/disk/loopback.c @@ -97,10 +97,6 @@ grub_cmd_loopback (grub_extcmd_context_t ctxt, int argc, char **args) if (newdev) { - char *newname = grub_strdup (args[1]); - if (! newname) - goto fail; - grub_file_close (newdev->file); newdev->file = file;