Commit a52a178f0b4dce6a85a45ccea348be92fc7f1b6d

Authored by Marek Vasut
Committed by Jagannadha Sutradharudu Teki
1 parent 25b4adbba0

sf: sf_ops: Stop leaking memory

It's usually a common pattern to free() the memory that we allocated.
Implement this here to stop leaking memory.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

drivers/mtd/spi/sf_ops.c
... ... @@ -421,6 +421,7 @@
421 421 data += read_len;
422 422 }
423 423  
  424 + free(cmd);
424 425 return ret;
425 426 }
426 427