Fix allocation bug in buffer code
Fix allocation bug in buffer code

boundarydevices/mxt-app,boundarydevices/mxt-app,kdunning/mxt-app,kdunning/mxt-app,barak/obp-utils,barak/obp-utils,vincentbernat/mxt-app,vincentbernat/mxt-app