On Thursday 11 December 2008 15:52:25 Mike Frysinger wrote:
> the `sf probe` command does:
> static int do_spi_flash_probe(...)
> {
>       ...
>       new = spi_flash_probe(bus, cs, speed, mode);
>       if (flash)
>               spi_flash_free(flash);
>       flash = new;
>       ...
> }

oh, i left out one last function ...
void spi_flash_free(struct spi_flash *flash)
{
        spi_free_slave(flash->spi);
        free(flash);
}
and we see the wrong "free(flash)" ...

maybe if the spi_flash structure provided a pointer to its parent, then we 
could do "free(flash->parent)" ...
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to