--- tools/rctest.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/rctest.c b/tools/rctest.c index 77fa03c..9281392 100644 --- a/tools/rctest.c +++ b/tools/rctest.c @@ -466,8 +466,11 @@ static void save_mode(int sk) while ((len = read(sk, b, data_size)) > 0) { ret = write(save_fd, b, len); if (ret < 0) - return; + goto done; } + +done: + free(b); } static void recv_mode(int sk) -- 1.8.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html