diff options
Diffstat (limited to 'source4/lib/tdb/common/tdb.c')
-rw-r--r-- | source4/lib/tdb/common/tdb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/tdb/common/tdb.c b/source4/lib/tdb/common/tdb.c index a6b472ae94..25103d826e 100644 --- a/source4/lib/tdb/common/tdb.c +++ b/source4/lib/tdb/common/tdb.c @@ -564,9 +564,10 @@ int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf) dbuf = tdb_fetch(tdb, key); if (dbuf.dptr == NULL) { - dbuf.dptr = malloc(new_dbuf.dsize); + dbuf.dptr = (unsigned char *)malloc(new_dbuf.dsize); } else { - dbuf.dptr = realloc(dbuf.dptr, dbuf.dsize + new_dbuf.dsize); + dbuf.dptr = (unsigned char *)realloc(dbuf.dptr, + dbuf.dsize + new_dbuf.dsize); } if (dbuf.dptr == NULL) { |