s3-registry: allow to read NULL entries (that we allow to store) back from the tdb.
authorGünther Deschner <gd@samba.org>
Thu, 1 Jul 2010 13:50:58 +0000 (15:50 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 2 Jul 2010 08:50:21 +0000 (10:50 +0200)
Guenther

source3/registry/reg_backend_db.c

index a31f7fbfb2abeb61f57fca2dd6030741353e9a18..22619eac26b3abe8dc0177e15f30ac764fc92fea 100644 (file)
@@ -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));