s3: Allow NULL for arg pwritten in cli_write_andx
authorVolker Lendecke <vl@samba.org>
Sat, 30 Apr 2011 08:58:35 +0000 (10:58 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 3 Jul 2011 09:31:29 +0000 (11:31 +0200)
source3/libsmb/clireadwrite.c

index 14b6401051e63624120f4c065755f29c02a951bd..64bdb484f31e3a5f662ae45312dfd3ac9ec26620 100644 (file)
@@ -903,7 +903,9 @@ NTSTATUS cli_write_andx_recv(struct tevent_req *req, size_t *pwritten)
        if (tevent_req_is_nterror(req, &status)) {
                return status;
        }
-       *pwritten = state->written;
+       if (pwritten != 0) {
+               *pwritten = state->written;
+       }
        return NT_STATUS_OK;
 }