The Samba-Bugzilla – Attachment 6407 Details for
Bug 8086
null pointer reference crashes winbind
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
0001-Allow-NULL-queue-to-writev_send.patch (text/plain), 1.57 KB, created by
Volker Lendecke
on 2011-04-14 12:57:53 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2011-04-14 12:57:53 UTC
Size:
1.57 KB
patch
obsolete
>From 8ecfae43b8aa27df4844365853c831e9b870962f Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Sun, 10 May 2009 10:49:18 +0200 >Subject: [PATCH] Allow NULL queue to writev_send > >--- > lib/async_req/async_sock.c | 22 ++++++++++++++++------ > 1 files changed, 16 insertions(+), 6 deletions(-) > >diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c >index 39705f4..c428e3c 100644 >--- a/lib/async_req/async_sock.c >+++ b/lib/async_req/async_sock.c >@@ -387,11 +387,11 @@ struct tevent_req *writev_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, > struct tevent_queue *queue, int fd, > struct iovec *iov, int count) > { >- struct tevent_req *result; >+ struct tevent_req *req; > struct writev_state *state; > >- result = tevent_req_create(mem_ctx, &state, struct writev_state); >- if (result == NULL) { >+ req = tevent_req_create(mem_ctx, &state, struct writev_state); >+ if (req == NULL) { > return NULL; > } > state->ev = ev; >@@ -404,12 +404,22 @@ struct tevent_req *writev_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, > goto fail; > } > >- if (!tevent_queue_add(queue, ev, result, writev_trigger, NULL)) { >+ if (queue == NULL) { >+ struct tevent_fd *fde; >+ fde = tevent_add_fd(state->ev, state, state->fd, >+ TEVENT_FD_WRITE, writev_handler, req); >+ if (tevent_req_nomem(fde, req)) { >+ return tevent_req_post(req, ev); >+ } >+ return req; >+ } >+ >+ if (!tevent_queue_add(queue, ev, req, writev_trigger, NULL)) { > goto fail; > } >- return result; >+ return req; > fail: >- TALLOC_FREE(result); >+ TALLOC_FREE(req); > return NULL; > } > >-- >1.7.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 8086
: 6407