Memory Leak fix

Fixed a small memory leak in sensor.cpp.
Was creating a buffer and not freeing it. Beginner error.