From: Jeremy Allison Date: Wed, 4 Mar 2020 21:29:08 +0000 (-0800) Subject: s3: VFS: vfs_aio_pthread. Fix leak of state struct on error. X-Git-Tag: ldb-2.2.0~1491 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1e247c3ba579ecc6ee03f5aad9679ed79fac5ac;p=thirdparty%2Fsamba.git s3: VFS: vfs_aio_pthread. Fix leak of state struct on error. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14301 Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke --- diff --git a/source3/modules/vfs_aio_pthread.c b/source3/modules/vfs_aio_pthread.c index d13ce2fdc63..37ba0c2c8a2 100644 --- a/source3/modules/vfs_aio_pthread.c +++ b/source3/modules/vfs_aio_pthread.c @@ -308,6 +308,7 @@ static int open_async(const files_struct *fsp, fsp->conn->sconn->pool, aio_open_worker, opd); if (subreq == NULL) { + TALLOC_FREE(opd); return -1; } tevent_req_set_callback(subreq, aio_open_handle_completion, opd);