summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-07-01 15:50:58 +0200
committerGünther Deschner <gd@samba.org>2010-07-02 10:50:21 +0200
commitddb8fae40174c72be8b3b6fc1c67cbaad3343153 (patch)
treee39e0ec4316cf6bab710b0e970f2b434b2294a12
parent6da040261debcbd4b193caf9d5a055efad898aca (diff)
downloadsamba-ddb8fae40174c72be8b3b6fc1c67cbaad3343153.tar.gz
samba-ddb8fae40174c72be8b3b6fc1c67cbaad3343153.tar.bz2
samba-ddb8fae40174c72be8b3b6fc1c67cbaad3343153.zip
s3-registry: allow to read NULL entries (that we allow to store) back from the tdb.
Guenther
-rw-r--r--source3/registry/reg_backend_db.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index a31f7fbfb2..22619eac26 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -1679,12 +1679,8 @@ static int regdb_unpack_values(struct regval_ctr *values, uint8 *buf, int buflen
&size,
&data_p);
- /* add the new value. Paranoid protective code -- make sure data_p is valid */
-
- if (size && data_p) {
- regval_ctr_addvalue(values, valuename, type,
- (uint8_t *)data_p, size);
- }
+ regval_ctr_addvalue(values, valuename, type,
+ (uint8_t *)data_p, size);
SAFE_FREE(data_p); /* 'B' option to tdb_unpack does a malloc() */
DEBUG(8,("specific: [%s], len: %d\n", valuename, size));