diff options
author | Simo Sorce <idra@samba.org> | 2008-04-14 12:43:37 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2008-04-14 12:45:51 -0400 |
commit | 4f51b0246db3242ee02ee16905cba13a5dc5633a (patch) | |
tree | af0692f28714db6e2c4ef6d985e501db58e57732 /source4/libnet/libnet.c | |
parent | 97e09c2f877779ca6d55684d33b1a24b8a280e51 (diff) | |
download | samba-4f51b0246db3242ee02ee16905cba13a5dc5633a.tar.gz samba-4f51b0246db3242ee02ee16905cba13a5dc5633a.tar.bz2 samba-4f51b0246db3242ee02ee16905cba13a5dc5633a.zip |
Fix problems with event context not being the parent.
(This used to be commit 957c4d893acf9e6db06a3fc3a4687ab6bb238635)
Diffstat (limited to 'source4/libnet/libnet.c')
-rw-r--r-- | source4/libnet/libnet.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source4/libnet/libnet.c b/source4/libnet/libnet.c index d1605bc17d..c966898cee 100644 --- a/source4/libnet/libnet.c +++ b/source4/libnet/libnet.c @@ -28,20 +28,17 @@ struct libnet_context *libnet_context_init(struct event_context *ev, { struct libnet_context *ctx; + /* We require an event context here */ + if (!ev) { + return NULL; + } + /* create brand new libnet context */ ctx = talloc(ev, struct libnet_context); if (!ctx) { return NULL; } - /* events */ - if (ev == NULL) { - ev = event_context_find(ctx); - if (ev == NULL) { - talloc_free(ctx); - return NULL; - } - } ctx->event_ctx = ev; ctx->lp_ctx = lp_ctx; |