summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-04 02:01:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:36:29 -0500
commit16788f27a8f56f39f6d272427655b9869d6c3005 (patch)
tree70f719f56318fa3e0183b36911f673bb5e28474a
parenteac7fe4ebc6eb819fe3721051751e60b12e95684 (diff)
downloadsamba-16788f27a8f56f39f6d272427655b9869d6c3005.tar.gz
samba-16788f27a8f56f39f6d272427655b9869d6c3005.tar.bz2
samba-16788f27a8f56f39f6d272427655b9869d6c3005.zip
r10019: Only return NT_STATUS_NO_MEMORY if the alloc failed..
(This used to be commit ea92959209fa256a8190df19e8c27b368169724f)
-rw-r--r--source4/lib/tdr/tdr.c6
1 files changed, 5 insertions, 1 deletions
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;
}