cppcheck: fix "Mismatching allocation and deallocation"

Change-Id: Ic007b07a82eb83978527254518d85c5a2903a48d