daily update
[deliverable/binutils-gdb.git] / gdb / target.c
index 0792707018c8a455a59679cac7e14b6a25bafa28..aa5992048dd26043a69e06becfe8b7875a810566 100644 (file)
@@ -1968,7 +1968,10 @@ read_whatever_is_readable (struct target_ops *ops,
 
   /* If we previously failed to read 1 byte, nothing can be done here.  */
   if (end - begin <= 1)
-    return;
+    {
+      xfree (buf);
+      return;
+    }
 
   /* Check that either first or the last byte is readable, and give up
      if not.  This heuristic is meant to permit reading accessible memory
@@ -1987,6 +1990,7 @@ read_whatever_is_readable (struct target_ops *ops,
     }
   else
     {
+      xfree (buf);
       return;
     }
 
This page took 0.025573 seconds and 4 git commands to generate.