* grub-core/lib/reed_solomon.c (rs_recover) [STANDALONE]:

Prevent memory leak.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-06-23 20:58:35 +02:00
parent 1abe47dc99
commit e061a1b537
2 changed files with 11 additions and 0 deletions

View file

@ -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>

View 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;
}