From 6ced9a08a6f60c340bb8725cb8932cdccf9e0565 Mon Sep 17 00:00:00 2001 From: Juha Sointusalo Date: Sun, 22 Nov 2015 22:50:08 +0200 Subject: [PATCH] vbox: fix memory leak in FloppyIO --- samples/vboxwrapper/floppyio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/vboxwrapper/floppyio.cpp b/samples/vboxwrapper/floppyio.cpp index 71c1e56bd4..f1d13d9fda 100644 --- a/samples/vboxwrapper/floppyio.cpp +++ b/samples/vboxwrapper/floppyio.cpp @@ -307,7 +307,7 @@ int FloppyIO::receive(string * ansBuffer) { // Copy input data to string object *ansBuffer = dataToReceive; - dataToReceive = NULL; + delete[] dataToReceive; return (int)ansBuffer->length(); }