From: Dragan Dosen Date: Wed, 1 Jul 2020 17:58:32 +0000 (+0200) Subject: MINOR: 51d: silence a warning about null pointer dereference X-Git-Tag: v2.2-dev12~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1ba552e41731266b89342628f403bf6b1ceb67c;p=thirdparty%2Fhaproxy.git MINOR: 51d: silence a warning about null pointer dereference This is due to issue #713, that reports null pointer dereference suspected by coverity. --- diff --git a/src/51d.c b/src/51d.c index b49695bbc4..52887a9340 100644 --- a/src/51d.c +++ b/src/51d.c @@ -239,6 +239,7 @@ static void _51d_set_headers(struct sample *smp, fiftyoneDegreesWorkset *ws) // No need to null check as this has already been carried out in the // calling method htx = smp_prefetch_htx(smp, chn, NULL, 1); + ALREADY_CHECKED(htx); for (i = 0; i < global_51degrees.header_count; i++) { name.ptr = (global_51degrees.header_names + i)->area; @@ -277,6 +278,7 @@ static void _51d_set_device_offsets(struct sample *smp, fiftyoneDegreesDeviceOff // No need to null check as this has already been carried out in the // calling method htx = smp_prefetch_htx(smp, chn, NULL, 1); + ALREADY_CHECKED(htx); for (i = 0; i < global_51degrees.header_count; i++) { name.ptr = (global_51degrees.header_names + i)->area;