Merge "Possible null pointer miss on realloc" am: 9bbbaf1480
am: 13d779d6b0

Change-Id: I8171ba374b1e22527a85af1835dd7af9368383b8