X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fat91sam7.c;h=7d0de3aaf5288f1e6409dff76165954d5c96cc0f;hb=b3d4a44686c8ed14baab7c466f14321b2dc5fec8;hp=3e99c4a6478f2b84ced89a5dd171141f43bde622;hpb=7800045671c954317371124e98438489847a627a;p=openocd.git diff --git a/src/flash/nor/at91sam7.c b/src/flash/nor/at91sam7.c index 3e99c4a647..7d0de3aaf5 100644 --- a/src/flash/nor/at91sam7.c +++ b/src/flash/nor/at91sam7.c @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ****************************************************************************/ /*************************************************************************** @@ -897,8 +897,10 @@ static int at91sam7_erase(struct flash_bank *bank, int first, int last) for (pos = 0; pos < nbytes; pos++) buffer[pos] = 0xFF; - if (at91sam7_write(bank, buffer, bank->sectors[first].offset, nbytes) != ERROR_OK) + if (at91sam7_write(bank, buffer, bank->sectors[first].offset, nbytes) != ERROR_OK) { + free(buffer); return ERROR_FLASH_OPERATION_FAILED; + } free(buffer); }