summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-06-20 06:05:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:12 -0500
commit7c01df4e77a08ec44ad32cc4c123f98fa270842f (patch)
tree820ec9b8311d1e9bd18d1f292d5f7b9648d2fa20 /source4/smb_server/smb
parent898f6f768f14ab98f4641b156a3d20d665b923b2 (diff)
downloadsamba-7c01df4e77a08ec44ad32cc4c123f98fa270842f.tar.gz
samba-7c01df4e77a08ec44ad32cc4c123f98fa270842f.tar.bz2
samba-7c01df4e77a08ec44ad32cc4c123f98fa270842f.zip
r16401: keep the old pointer when realloc fails, this is needed for the
search callback metze (This used to be commit c868b8b7d7ee0424ed955f699543593aaa633e92)
Diffstat (limited to 'source4/smb_server/smb')
-rw-r--r--source4/smb_server/smb/trans2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/smb_server/smb/trans2.c b/source4/smb_server/smb/trans2.c
index 16a2e14f30..dd97f73698 100644
--- a/source4/smb_server/smb/trans2.c
+++ b/source4/smb_server/smb/trans2.c
@@ -67,8 +67,10 @@ static NTSTATUS trans2_grow_data(TALLOC_CTX *mem_ctx,
uint32_t new_size)
{
if (new_size > blob->length) {
- blob->data = talloc_realloc(mem_ctx, blob->data, uint8_t, new_size);
- NT_STATUS_HAVE_NO_MEMORY(blob->data);
+ uint8_t *p;
+ p = talloc_realloc(mem_ctx, blob->data, uint8_t, new_size);
+ NT_STATUS_HAVE_NO_MEMORY(p);
+ blob->data = p;
}
blob->length = new_size;
return NT_STATUS_OK;