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(); }