summaryrefslogtreecommitdiff
path: root/source4/lib/data_blob.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-05-09 12:30:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:50 -0500
commit5dc73338d22ce95299ed62b73d1c15c94581495e (patch)
tree83bf07e4d639daac0672e623cdcf4664a4504976 /source4/lib/data_blob.c
parent51d5ddecc60b6e33e1d542cb92b2fe6736849398 (diff)
downloadsamba-5dc73338d22ce95299ed62b73d1c15c94581495e.tar.gz
samba-5dc73338d22ce95299ed62b73d1c15c94581495e.tar.bz2
samba-5dc73338d22ce95299ed62b73d1c15c94581495e.zip
r607: When our code is looking for an 'empty' data blob
some of it tests the .length, other code checks the .data. Ensure that we always NULL the .data, so that talloc-based blobs behave just like their direct malloc equivalents. Andrew Bartlett (This used to be commit 64121aa1a9d037d3969f24be62f4521611c89888)
Diffstat (limited to 'source4/lib/data_blob.c')
-rw-r--r--source4/lib/data_blob.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source4/lib/data_blob.c b/source4/lib/data_blob.c
index b5d1b4076e..3667d453b9 100644
--- a/source4/lib/data_blob.c
+++ b/source4/lib/data_blob.c
@@ -108,6 +108,7 @@ void data_blob_free(DATA_BLOB *d)
if (d->free) {
(d->free)(d);
}
+ d->data = NULL;
d->length = 0;
}
}