summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_aio_pthread.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-01-11 16:37:48 -0800
committerJeremy Allison <jra@samba.org>2012-01-12 03:10:52 +0100
commitddc1f3df5183081aeb7c5b97b7fa4426c772346d (patch)
tree793b687bdfac179b81f2e5c9b609b294f21791c0 /source3/modules/vfs_aio_pthread.c
parentf15cf9176df974c8a460db3ce74abf38d3f552ae (diff)
downloadsamba-ddc1f3df5183081aeb7c5b97b7fa4426c772346d.tar.gz
samba-ddc1f3df5183081aeb7c5b97b7fa4426c772346d.tar.bz2
samba-ddc1f3df5183081aeb7c5b97b7fa4426c772346d.zip
Ensure we always free aio_ex on all error paths by moving the TALLOC_FREE
call out of smbd_aio_complete_aio_ex() and into the caller. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Jan 12 03:10:52 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/modules/vfs_aio_pthread.c')
-rw-r--r--source3/modules/vfs_aio_pthread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/modules/vfs_aio_pthread.c b/source3/modules/vfs_aio_pthread.c
index 82611b0a7b..b6d4e1ef35 100644
--- a/source3/modules/vfs_aio_pthread.c
+++ b/source3/modules/vfs_aio_pthread.c
@@ -296,7 +296,7 @@ static void aio_pthread_handle_completion(struct event_context *event_ctx,
DEBUG(10,("aio_pthread_handle_completion: jobid %d completed\n",
jobid ));
-
+ TALLOC_FREE(aio_ex);
}
/************************************************************************
@@ -424,6 +424,7 @@ static void aio_pthread_handle_immediate(struct tevent_context *ctx,
TALLOC_FREE(pjobid);
aio_ex = (struct aio_extra *)pd->aiocb->aio_sigevent.sigev_value.sival_ptr;
smbd_aio_complete_aio_ex(aio_ex);
+ TALLOC_FREE(aio_ex);
}
/************************************************************************