From: Jeremy Allison Date: Wed, 17 Jul 2019 20:07:33 +0000 (-0700) Subject: s3: smbd: Replace dptr_fetch() with dptr_fetch_fsp() in reply_fclose(). X-Git-Tag: tdb-1.4.2~350 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=68e403fa587b4c6a27e6d0f2b901942a01e42ea6;p=thirdparty%2Fsamba.git s3: smbd: Replace dptr_fetch() with dptr_fetch_fsp() in reply_fclose(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index ee57f2f2fe7..6038a59ad50 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -2194,14 +2194,12 @@ void reply_fclose(struct smb_request *req) memcpy(status,p,21); - if(dptr_fetch(sconn, status+12,&dptr_num)) { - fsp = dptr_fsp(sconn, dptr_num); + fsp = dptr_fetch_fsp(sconn, status+12,&dptr_num); + if(fsp != NULL) { /* Close the dptr - we know it's gone */ dptr_close(sconn, &dptr_num); - if (fsp != NULL) { - close_file(NULL, fsp, NORMAL_CLOSE); - fsp = NULL; - } + close_file(NULL, fsp, NORMAL_CLOSE); + fsp = NULL; } reply_outbuf(req, 1, 0);