Fix possible memleak
Free RX buffer in error case

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>