From 0b1e1ed7223b4ed900b6ee738b2f71a0473ac718 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 29 Mar 2006 23:25:04 +0000 Subject: r14782: Fix coverity bug #273, null deref. Jeremy. (This used to be commit c2636c10262e8045f701143dee22b10b2d0c0344) --- source3/rpc_client/cli_echo.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3') diff --git a/source3/rpc_client/cli_echo.c b/source3/rpc_client/cli_echo.c index 89de6cec94..9818fad79b 100644 --- a/source3/rpc_client/cli_echo.c +++ b/source3/rpc_client/cli_echo.c @@ -79,6 +79,9 @@ NTSTATUS rpccli_echo_data(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, if (out_data) { *out_data = TALLOC(mem_ctx, size); + if (!*out_data) { + return NT_STATUS_NO_MEMORY; + } memcpy(*out_data, r.data, size); } -- cgit