From 134e9dbda53618fa3a8be464cabbf65cd27bf09d Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 29 Sep 2009 13:48:15 +0000 Subject: Allow apssing NULL to assuan_release. --- src/assuan.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/assuan.c') diff --git a/src/assuan.c b/src/assuan.c index d2c9f17..06b9b8a 100644 --- a/src/assuan.c +++ b/src/assuan.c @@ -168,10 +168,13 @@ _assuan_reset (assuan_context_t ctx) void assuan_release (assuan_context_t ctx) { - TRACE (ctx, ASSUAN_LOG_CTX, "assuan_release", ctx); - - _assuan_reset (ctx); - /* None of the members that are our responsibility requires - deallocation. */ - _assuan_free (ctx, ctx); + if (ctx) + { + TRACE (ctx, ASSUAN_LOG_CTX, "assuan_release", ctx); + + _assuan_reset (ctx); + /* None of the members that are our responsibility requires + deallocation. */ + _assuan_free (ctx, ctx); + } } -- cgit v1.2.3