From 8e055565e043ffab1ee87311b341c1793b416887 Mon Sep 17 00:00:00 2001 From: Marcel Poul Date: Tue, 1 Nov 2011 08:28:15 +0000 Subject: [PATCH] real ctx retured now --- emi.canl.canl-c/src/canl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/emi.canl.canl-c/src/canl.c b/emi.canl.canl-c/src/canl.c index f3681ee..42b0d0a 100644 --- a/emi.canl.canl-c/src/canl.c +++ b/emi.canl.canl-c/src/canl.c @@ -27,8 +27,10 @@ canl_ctx canl_create_ctx() new_ctx->io_ctx = NULL; new_ctx->err_msg = NULL; end: - return new_ctx; - + if (err) + return NULL; + else + return new_ctx; } void canl_free_ctx(canl_ctx cc) -- 1.8.2.3