From: Alan T. DeKok Date: Sat, 20 Nov 2021 16:18:06 +0000 (-0500) Subject: clear the right thing X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf27278d8be4a3cdad8ee846cb50c187d83fbc1f;p=thirdparty%2Ffreeradius-server.git clear the right thing --- diff --git a/src/lib/util/calc.c b/src/lib/util/calc.c index ff21089c6e0..8f65ab0f05b 100644 --- a/src/lib/util/calc.c +++ b/src/lib/util/calc.c @@ -383,8 +383,8 @@ static int calc_octets(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_value_box_t cons return ERR_INVALID; /* invalid operator */ } - if (a != &one) fr_value_box_clear(&one); - if (b != &two) fr_value_box_clear(&two); + if (a == &one) fr_value_box_clear_value(&one); + if (b == &two) fr_value_box_clear_value(&two); return 0; } @@ -442,8 +442,8 @@ static int calc_string(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_value_box_t cons return ERR_INVALID; /* invalid operator */ } - if (a != &one) fr_value_box_clear(&one); - if (b != &two) fr_value_box_clear(&two); + if (a == &one) fr_value_box_clear_value(&one); + if (b == &two) fr_value_box_clear_value(&two); return 0; }