diff --git a/src/http_conv.c b/src/http_conv.c index f496c560c..fdf3c42f1 100644 --- a/src/http_conv.c +++ b/src/http_conv.c @@ -276,7 +276,7 @@ static int sample_conv_url_dec(const struct arg *args, struct sample *smp, void static int smp_conv_req_capture(const struct arg *args, struct sample *smp, void *private) { - struct proxy *fe = strm_fe(smp->strm); + struct proxy *fe; int idx, i; struct cap_hdr *hdr; int len; @@ -284,6 +284,10 @@ static int smp_conv_req_capture(const struct arg *args, struct sample *smp, void if (!args || args->type != ARGT_SINT) return 0; + if (!smp->strm) + return 0; + + fe = strm_fe(smp->strm); idx = args->data.sint; /* Check the availibity of the capture id. */ @@ -317,7 +321,7 @@ static int smp_conv_req_capture(const struct arg *args, struct sample *smp, void static int smp_conv_res_capture(const struct arg *args, struct sample *smp, void *private) { - struct proxy *fe = strm_fe(smp->strm); + struct proxy *fe; int idx, i; struct cap_hdr *hdr; int len; @@ -325,6 +329,10 @@ static int smp_conv_res_capture(const struct arg *args, struct sample *smp, void if (!args || args->type != ARGT_SINT) return 0; + if (!smp->strm) + return 0; + + fe = strm_fe(smp->strm); idx = args->data.sint; /* Check the availibity of the capture id. */