[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1463-g512879a

Stefan (metze) Metzmacher metze at samba.org
Thu May 7 07:21:32 GMT 2009


Hi Jeremy,

> +struct cli_setattrE_state {
> +	int dummy;
> +};
> +
> +struct tevent_req *cli_setattrE_send(TALLOC_CTX *mem_ctx,
> +				struct event_context *ev,
> +				struct cli_state *cli,
> +				uint16_t fnum,
> +				time_t change_time,
> +				time_t access_time,
> +				time_t write_time)
>  {
> -	char *p;
> +	struct tevent_req *req = NULL, *subreq = NULL;
> +	struct cli_setattrE_state *state = NULL;
> +	uint8_t additional_flags = 0;
> +	uint16_t vwv[7];

vwv needs to be in the state structure. Wouldn't valgrind catch such
things?

Your following commit has the same problem.

> +	subreq = cli_smb_send(state, ev, cli, SMBsetattrE, additional_flags,
> +			      7, vwv, 0, NULL);

In general all non scalar input parameters to a _send() function need to
be arround until the _recv function is called.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-cvs/attachments/20090507/363a20dd/signature.bin


More information about the samba-cvs mailing list