]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/lib/reed_solomon.c (rs_recover) [STANDALONE]:
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 23 Jun 2011 18:58:35 +0000 (20:58 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 23 Jun 2011 18:58:35 +0000 (20:58 +0200)
Prevent memory leak.

ChangeLog
grub-core/lib/reed_solomon.c

index c267a8a0fd582a91ad685fa8fc220b28c220276b..327b52afcb8ad2c97c3e58e4fea4e68e6039bfc7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,13 @@
+2011-06-23  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/lib/reed_solomon.c (rs_recover) [STANDALONE]:
+       Prevent memory leak.
+
 2011-06-23  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/lib/reed_solomon.c (rs_recover): Prevent memory leak.
        (main): Close file.
+       Reported by: David Volgyes <dvolgyes>.
 
 2011-06-23  Vladimir Serbinenko  <phcoder@gmail.com>
 
index 8b5e8235a9164cb44b33d07b2c65c63a5bea4359..365b7600339151043509ca2e1283e5212801306c 100644 (file)
@@ -277,6 +277,11 @@ rs_recover (gf_single_t *m, grub_size_t s, grub_size_t rs)
       free (errpot);
       free (errpos);
       free (sy);
+#else
+      scratch -= rs2 * sizeof (gf_single_t);
+      scratch -= rs2 * sizeof (gf_single_t);
+      scratch -= rs2 * sizeof (int);
+      scratch -= rs * sizeof (gf_single_t);
 #endif
       return;
     }