From: Colin Watson Date: Fri, 1 Apr 2011 14:35:09 +0000 (+0100) Subject: * grub-core/disk/loopback.c (grub_cmd_loopback): Fix a memory leak X-Git-Tag: 1.99~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=186ae367af232e0c8faa43abad07085d5787071c;p=thirdparty%2Fgrub.git * grub-core/disk/loopback.c (grub_cmd_loopback): Fix a memory leak when replacing an existing device. --- 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;