From 3b1606ceb901d2f05d57a08d951921c5ff75a751 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Mon, 24 Jul 2017 11:52:23 +0200 Subject: [PATCH] Remove misguiding if --- libretroshare/src/serialiser/rstlvbinary.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libretroshare/src/serialiser/rstlvbinary.cc b/libretroshare/src/serialiser/rstlvbinary.cc index 7eaa58ae2..9c84f6ec2 100644 --- a/libretroshare/src/serialiser/rstlvbinary.cc +++ b/libretroshare/src/serialiser/rstlvbinary.cc @@ -90,14 +90,11 @@ bool RsTlvBinaryData::setBinData(const void *data, uint32_t size) void RsTlvBinaryData::TlvClear() { - if (bin_data) - { - free(bin_data); - } + free(bin_data); TlvShallowClear(); } -void RsTlvBinaryData::TlvShallowClear() +void RsTlvBinaryData::TlvShallowClear() { bin_data = NULL; bin_len = 0;