Fix CID 1508979: unchecked return value (#10281)
diff --git a/plugins/lua/ts_lua_util.cc b/plugins/lua/ts_lua_util.cc
index 7eacada..94150d9 100644
--- a/plugins/lua/ts_lua_util.cc
+++ b/plugins/lua/ts_lua_util.cc
@@ -53,7 +53,10 @@
ts_lua_update_server_response_hdrp(ts_lua_http_ctx *http_ctx)
{
if (http_ctx->server_response_hdrp) {
- TSHttpTxnServerRespGet(http_ctx->txnp, &http_ctx->server_response_bufp, &http_ctx->server_response_hdrp);
+ if (TSHttpTxnServerRespGet(http_ctx->txnp, &http_ctx->server_response_bufp, &http_ctx->server_response_hdrp) != TS_SUCCESS) {
+ TSError("[ts_lua][%s] failed to get server response", __FUNCTION__);
+ return;
+ }
}
}