am 4a72b306: Merge "fix possible buffer overrun and memory leak"

* commit '4a72b3064cecc85c56b8d75bb4a2d9fedbf76ec8':
  fix possible buffer overrun and memory leak