Replace short-lived NULL talloc contexts with talloc_tos().
[nivanova/samba-autobuild/.git] / source3 / lib / dbwrap_tdb.c
index c71e073b41e5110626ee942a12b7009c7d462951..297a351764ec0e344e1076b5761524389ac70416 100644 (file)
@@ -94,7 +94,7 @@ static struct db_record *db_tdb_fetch_locked(struct db_context *db,
 
        /* Do not accidently allocate/deallocate w/o need when debug level is lower than needed */
        if(DEBUGLEVEL >= 10) {
-               char *keystr = hex_encode_talloc(NULL, (unsigned char*)key.dptr, key.dsize);
+               char *keystr = hex_encode_talloc(talloc_tos(), (unsigned char*)key.dptr, key.dsize);
                DEBUG(10, (DEBUGLEVEL > 10
                           ? "Locking key %s\n" : "Locking key %.20s\n",
                           keystr));