diff options
author | Werner Koch <wk@gnupg.org> | 2009-09-29 13:48:15 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2009-09-29 13:48:15 +0000 |
commit | 134e9dbda53618fa3a8be464cabbf65cd27bf09d (patch) | |
tree | 9564541c0e23c8c24a830b87e399cc1120c47ecf /src | |
parent | cd87e56dac64c74d45f42838fc1049848f8aadcd (diff) | |
download | libassuan-134e9dbda53618fa3a8be464cabbf65cd27bf09d.tar.gz |
Allow apssing NULL to assuan_release.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/assuan.c | 15 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 627d369..41253b3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2009-09-29 Werner Koch <wk@g10code.com> + + * assuan.c (assuan_release): Allow passing a NULL ctx. + 2009-09-19 Marcus Brinkmann <marcus@g10code.de> * src/libassuan.vers, src/libassuan.def: Update to new API. 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); + } } |