reed_solomon: fix memory leak

Found by: Coverity scan.
CID: 96688
This commit is contained in:
Andrei Borzenkov 2015-06-20 23:38:18 +03:00
parent cf0b0306d8
commit a6f7d1abce

View file

@ -362,7 +362,7 @@ grub_reed_solomon_add_redundancy (void *buffer, grub_size_t data_size,
/* Nothing to do. */
if (!rs)
return;
goto exit;
init_powx ();
@ -388,6 +388,7 @@ grub_reed_solomon_add_redundancy (void *buffer, grub_size_t data_size,
#ifndef TEST
assert (grub_memcmp (tmp, buffer, data_size) == 0);
#endif
exit:
free (tmp);
}
#endif