From 997dfbbf5409a9df3b3c87025fa80fb6bdafcac2 Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Mon, 23 Feb 2009 17:43:47 -0800 Subject: s3 OneFS: Fix a double free in an error path --- source3/smbd/oplock_onefs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/oplock_onefs.c b/source3/smbd/oplock_onefs.c index 0908ce4386..d4f181fc47 100644 --- a/source3/smbd/oplock_onefs.c +++ b/source3/smbd/oplock_onefs.c @@ -744,13 +744,13 @@ struct kernel_oplocks *onefs_init_kernel_oplocks(TALLOC_CTX *mem_ctx) po.po_flags_on |= P_NON_BLOCKING_SEMLOCK; if (setprocoptions(&po) != 0) { DEBUG(0, ("setprocoptions failed: %s.\n", strerror(errno))); - goto err_out; + return NULL; } /* Setup the oplock contexts */ _ctx = talloc_zero(mem_ctx, struct kernel_oplocks); if (!_ctx) { - goto err_out; + return NULL; } ctx = talloc_zero(_ctx, struct onefs_oplocks_context); @@ -788,7 +788,6 @@ struct kernel_oplocks *onefs_init_kernel_oplocks(TALLOC_CTX *mem_ctx) err_out: talloc_free(_ctx); - talloc_free(ctx); return NULL; } -- cgit