mbox series

[U-Boot,v2,0/8] Fix some coverity warnings

Message ID 20180612060502.196817-1-sjg@chromium.org
Headers show
Series Fix some coverity warnings | expand

Message

Simon Glass June 12, 2018, 6:04 a.m. UTC
This series attempts to fix various problems reported by Coverity, in
subsystems where I have some knowledge.

Changes in v2:
- Change log_get_cat_name() to always return a valid string, even if the
    uclass is not found
- Also remove the leading / from the "/spl" path
- Add a missing free() from one error path
- Add a comment defending the technical memory leaks that remain
- Fre the string when device_bind() fails, and presumably doesn't need it

Simon Glass (8):
  log: Fix incorect range check in log_get_cat_name()
  console: Fix handling of NULL global_data
  sandbox: Use memcpy() to move overlapping regions
  fdtgrep: Fix logic of free() in do_fdtgrep()
  fdtgrep: Separate out checking of two allocations
  rsa: Fix missing memory leak on error in fdt_add_bignum()
  spi: sandbox: Fix memory leak in sandbox_sf_bind_emul()
  sandbox: swap_case: Increase number of base address regs

 arch/sandbox/cpu/os.c     |  5 +++--
 common/console.c          |  8 ++++++--
 common/log.c              | 10 +++++++---
 drivers/misc/swap_case.c  |  2 +-
 drivers/mtd/spi/sandbox.c |  7 ++++---
 include/log.h             |  3 ++-
 lib/rsa/rsa-sign.c        | 13 ++++++++++---
 tools/fdtgrep.c           | 16 +++++++++++-----
 8 files changed, 44 insertions(+), 20 deletions(-)