diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/data_blob.c | 2 | ||||
-rw-r--r-- | source4/lib/tdb/tdbutil.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/source4/lib/data_blob.c b/source4/lib/data_blob.c index 933617e9ee..457ad382a2 100644 --- a/source4/lib/data_blob.c +++ b/source4/lib/data_blob.c @@ -67,12 +67,12 @@ DATA_BLOB data_blob_talloc(TALLOC_CTX *mem_ctx, const void *p, size_t length) } if (p == NULL) { + /* note that we do NOT zero memory in this case */ ret.data = talloc(mem_ctx, length); if (ret.data == NULL) { smb_panic("data_blob_talloc: talloc_memdup failed.\n"); } ret.length = length; - memset(ret.data, 0, ret.length); ret.free = NULL; return ret; } diff --git a/source4/lib/tdb/tdbutil.c b/source4/lib/tdb/tdbutil.c index ce5188300c..3c22333b4d 100644 --- a/source4/lib/tdb/tdbutil.c +++ b/source4/lib/tdb/tdbutil.c @@ -710,7 +710,6 @@ TDB_LIST_NODE *tdb_search_keys(TDB_CONTEXT *tdb, const char* pattern) TDB_DATA key, next; TDB_LIST_NODE *list = NULL; TDB_LIST_NODE *rec = NULL; - TDB_LIST_NODE *tmp = NULL; for (key = tdb_firstkey(tdb); key.dptr; key = next) { /* duplicate key string to ensure null-termination */ @@ -731,7 +730,7 @@ TDB_LIST_NODE *tdb_search_keys(TDB_CONTEXT *tdb, const char* pattern) rec->node_key = key; - DLIST_ADD_END(list, rec, tmp); + DLIST_ADD_END(list, rec, TDB_LIST_NODE *); DEBUG(18, ("checking %s matched pattern %s\n", key_str, pattern)); } else { |