summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/connection.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c
index 0442a9441a..7838c5c23d 100644
--- a/source3/smbd/connection.c
+++ b/source3/smbd/connection.c
@@ -272,11 +272,10 @@ static TDB_DATA* make_pipe_rec_key( struct pipe_open_rec *prec )
snprintf( key_string, sizeof(key_string), "%s/%d/%d",
prec->name, procid_to_pid(&prec->pid), prec->pnum );
- if ( (kbuf->dptr = talloc_strdup(prec, key_string)) == NULL )
+ *kbuf = string_term_tdb_data(talloc_strdup(prec, key_string));
+ if (kbuf->dptr == NULL )
return NULL;
-
- kbuf->dsize = strlen(key_string)+1;
-
+
return kbuf;
}