From b9461058d59f8e4f4b69c31592bd12a179b2d8ac Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 29 Mar 2007 08:24:15 +0000 Subject: r22008: use string_term_tdb_data() metze (This used to be commit 1f047d7e31252481c4ed905e0dfdb791c704adca) --- source3/smbd/connection.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3/smbd') 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; } -- cgit