Skip to content

Commit 8659235

Browse files
authored
Fix CID 1508979: unchecked return value (#10281)
1 parent 71a81c2 commit 8659235

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/lua/ts_lua_util.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ void
5353
ts_lua_update_server_response_hdrp(ts_lua_http_ctx *http_ctx)
5454
{
5555
if (http_ctx->server_response_hdrp) {
56-
TSHttpTxnServerRespGet(http_ctx->txnp, &http_ctx->server_response_bufp, &http_ctx->server_response_hdrp);
56+
if (TSHttpTxnServerRespGet(http_ctx->txnp, &http_ctx->server_response_bufp, &http_ctx->server_response_hdrp) != TS_SUCCESS) {
57+
TSError("[ts_lua][%s] failed to get server response", __FUNCTION__);
58+
return;
59+
}
5760
}
5861
}
5962

0 commit comments

Comments
 (0)