diff --git a/common/rfb/Configuration.cxx b/common/rfb/Configuration.cxx
index c2f59d86fd7d22a261b0d6c091f959c241644f72..4b376168d06495966cadd0a0819eb3703b9e6429 100644
--- a/common/rfb/Configuration.cxx
+++ b/common/rfb/Configuration.cxx
@@ -456,7 +456,9 @@ void BinaryParameter::setParam(const uint8_t* v, size_t len) {
   LOCK_CONFIG;
   if (immutable) return; 
   vlog.debug("set %s(Binary)", getName());
-  delete [] value; value = 0;
+  delete [] value;
+  value = NULL;
+  length = 0;
   if (len) {
     assert(v);
     value = new uint8_t[len];