prf-plus: Wipe seed and internal buffer
[strongswan.git] / src / libstrongswan / crypto / prf_plus.c
index 6b7f8f8..a26010a 100644 (file)
@@ -115,8 +115,8 @@ METHOD(prf_plus_t, allocate_bytes, bool,
 METHOD(prf_plus_t, destroy, void,
        private_prf_plus_t *this)
 {
-       free(this->buffer.ptr);
-       free(this->seed.ptr);
+       chunk_clear(&this->buffer);
+       chunk_clear(&this->seed);
        free(this);
 }