svn commit: samba r17990 - in branches/SAMBA_4_0/source/librpc/rpc:.

Stefan (metze) Metzmacher metze at samba.org
Fri Sep 1 11:06:40 GMT 2006


Hi Tridge,

>  /*
> +  handle timeouts of a dcerpc connect
> +*/
> +static void dcerpc_connect_timeout_handler(struct event_context *ev,
> struct timed_event *te,
> +					   struct timeval t, void *private)
> +{
> +	struct composite_context *c = talloc_get_type(private, struct
> composite_context);
> +	DEBUG(0,("DCERPC CONNECT TIMEOUT\n"));
> +	composite_error(c, NT_STATUS_IO_TIMEOUT);
> +	composite_done(c);
> +}

this is wrong, composite_error() already calls the callback and frees 'c'
and composite_done() would use freed memory

> +
> +	event_add_timed(c->event_ctx, c,
> +			timeval_current_ofs(DCERPC_REQUEST_TIMEOUT, 0),
> +			dcerpc_connect_timeout_handler, c);

we should maybe check the result of event_add_timed(),
but I know we don't do in a lot of places...

metze



More information about the samba-technical mailing list