From 16788f27a8f56f39f6d272427655b9869d6c3005 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 4 Sep 2005 02:01:42 +0000 Subject: r10019: Only return NT_STATUS_NO_MEMORY if the alloc failed.. (This used to be commit ea92959209fa256a8190df19e8c27b368169724f) --- source4/lib/tdr/tdr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source4/lib/tdr/tdr.c b/source4/lib/tdr/tdr.c index 7f42d0cf15..e1e54622ac 100644 --- a/source4/lib/tdr/tdr.c +++ b/source4/lib/tdr/tdr.c @@ -55,7 +55,11 @@ NTSTATUS tdr_push_expand(struct tdr_push *tdr, uint32_t size) } tdr->data.data = talloc_realloc(tdr, tdr->data.data, uint8_t, tdr->data.length + TDR_BASE_MARSHALL_SIZE); - return NT_STATUS_NO_MEMORY; + + if (tdr->data.data == NULL) + return NT_STATUS_NO_MEMORY; + + return NT_STATUS_OK; } -- cgit