summaryrefslogtreecommitdiffstats
path: root/librpc
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-01-06 21:24:30 +0100
committerVolker Lendecke <vl@samba.org>2009-01-06 21:25:18 +0100
commite92b7abca083de7acf03b0211ccc8ca935398794 (patch)
treef07fb2992f84ef0dfb220682d519c283ceaf19a6 /librpc
parent05f97d32358168efdad111be9c36f61e011d4466 (diff)
downloadsamba-e92b7abca083de7acf03b0211ccc8ca935398794.tar.gz
samba-e92b7abca083de7acf03b0211ccc8ca935398794.tar.xz
samba-e92b7abca083de7acf03b0211ccc8ca935398794.zip
Add a NULL check and some const to dcerpc_floor_get_lhs_data()
Diffstat (limited to 'librpc')
-rw-r--r--librpc/rpc/binding.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/librpc/rpc/binding.c b/librpc/rpc/binding.c
index a660989d198..4f36faca796 100644
--- a/librpc/rpc/binding.c
+++ b/librpc/rpc/binding.c
@@ -370,13 +370,19 @@ _PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struc
return NT_STATUS_OK;
}
-_PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax)
+_PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(const struct epm_floor *epm_floor,
+ struct ndr_syntax_id *syntax)
{
TALLOC_CTX *mem_ctx = talloc_init("floor_get_lhs_data");
- struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx, NULL);
+ struct ndr_pull *ndr;
enum ndr_err_code ndr_err;
uint16_t if_version=0;
+ ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx, NULL);
+ if (ndr == NULL) {
+ talloc_free(mem_ctx);
+ return NT_STATUS_NO_MEMORY;
+ }
ndr->flags |= LIBNDR_FLAG_NOALIGN;
ndr_err = ndr_pull_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid);