]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/disk/loopback.c (grub_cmd_loopback): Fix a memory leak
authorColin Watson <cjwatson@ubuntu.com>
Fri, 1 Apr 2011 14:35:09 +0000 (15:35 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Fri, 1 Apr 2011 14:35:09 +0000 (15:35 +0100)
when replacing an existing device.

ChangeLog
grub-core/disk/loopback.c

index 044be9d5c44f5a9be4e45c71fe1aef75c83f7655..512b61cac42769019b4ab127e024c8ec555439ca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-01  Colin Watson  <cjwatson@ubuntu.com>
+
+       * grub-core/disk/loopback.c (grub_cmd_loopback): Fix a memory leak
+       when replacing an existing device.
+
 2011-04-01  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Fix incorrect types in jfs.c. This enables >2TiB disks and fixes some
index b05940a4a110ca931e08075356018a54b04de40c..02e6c164fe13a27ffc40da7382cd731843aced67 100644 (file)
@@ -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;