]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
set output on success, not on error
authorAlan T. DeKok <aland@freeradius.org>
Fri, 19 Nov 2021 21:28:49 +0000 (16:28 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 19 Nov 2021 21:28:49 +0000 (16:28 -0500)
src/lib/util/sbuff.c

index 14a02c5453fe640bd0a095d9b74762e9f17f82e6..78e1c1c22e7fabd2537b01bb7e9a1e7849d76ce8 100644 (file)
@@ -1253,9 +1253,9 @@ fr_slen_t fr_sbuff_out_##_name(fr_sbuff_parse_error_t *err, _type *out, fr_sbuff
        } \
        if (no_trailing && (*end != '\0')) { \
                if (err) *err = FR_SBUFF_PARSE_ERROR_TRAILING; \
-               *out = res; \
                return fr_sbuff_error(&our_in); \
        } \
+       *out = res; \
        return fr_sbuff_advance(in, end - buff); \
 }