]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Correct MEM() check of fr_pair_value_mem_alloc() return value (#4497)
authorJames Jones <jejones3141@gmail.com>
Mon, 9 May 2022 21:38:14 +0000 (16:38 -0500)
committerGitHub <noreply@github.com>
Mon, 9 May 2022 21:38:14 +0000 (16:38 -0500)
src/modules/rlm_ocsp/ocsp.c

index a3b36464a947d60369099ce7425caab484015116..ba06a06475866a2567d68ff27b50d2650a81dee5 100644 (file)
@@ -157,7 +157,7 @@ static int ocsp_staple_to_pair(fr_pair_t **out, request_t *request, OCSP_RESPONS
        }
 
        MEM(pair_update_request(&vp, attr_tls_ocsp_response) >= 0);
-       MEM(fr_pair_value_mem_alloc(vp, &p, len, true));
+       MEM(fr_pair_value_mem_alloc(vp, &p, len, true) == 0);
        len = i2d_OCSP_RESPONSE(resp, &p);
        if (len <= 0) {
                REDEBUG("Failed serialising OCSP response");