[svn] GnuPG - r4386 - trunk/sm
svn author marcus
cvs at cvs.gnupg.org
Wed Dec 20 23:52:15 CET 2006
Author: marcus
Date: 2006-12-20 23:52:14 +0100 (Wed, 20 Dec 2006)
New Revision: 4386
Modified:
trunk/sm/ChangeLog
trunk/sm/base64.c
Log:
2006-12-20 Marcus Brinkmann <marcus at g10code.de>
* base64.c: Add new members READER and WRITER in union U2.
(gpgsm_create_reader): Initialise CTX->u2.reader.
(gpgsm_destroy_reader): Invoke ksba_reader_release. Return early
if CTX is NULL.
(gpgsm_create_writer): Initialise CTX->u2.writer.
(gpgsm_destroy_writer): Invoke ksba_writer_release. Return early
if CTX is NULL.
Modified: trunk/sm/ChangeLog
===================================================================
--- trunk/sm/ChangeLog 2006-12-18 01:03:07 UTC (rev 4385)
+++ trunk/sm/ChangeLog 2006-12-20 22:52:14 UTC (rev 4386)
@@ -1,3 +1,13 @@
+2006-12-20 Marcus Brinkmann <marcus at g10code.de>
+
+ * base64.c: Add new members READER and WRITER in union U2.
+ (gpgsm_create_reader): Initialise CTX->u2.reader.
+ (gpgsm_destroy_reader): Invoke ksba_reader_release. Return early
+ if CTX is NULL.
+ (gpgsm_create_writer): Initialise CTX->u2.writer.
+ (gpgsm_destroy_writer): Invoke ksba_writer_release. Return early
+ if CTX is NULL.
+
2006-12-18 Marcus Brinkmann <marcus at g10code.de>
* fingerprint.c (gpgsm_get_fingerprint): Close MD.
Modified: trunk/sm/base64.c
===================================================================
--- trunk/sm/base64.c 2006-12-18 01:03:07 UTC (rev 4385)
+++ trunk/sm/base64.c 2006-12-20 22:52:14 UTC (rev 4386)
@@ -92,6 +92,11 @@
struct reader_cb_parm_s rparm;
struct writer_cb_parm_s wparm;
} u;
+
+ union {
+ ksba_reader_t reader;
+ ksba_writer_t writer;
+ } u2;
};
@@ -568,6 +573,7 @@
return rc;
}
+ (*ctx)->u2.reader = r;
*r_reader = r;
return 0;
}
@@ -582,6 +588,10 @@
void
gpgsm_destroy_reader (Base64Context ctx)
{
+ if (!ctx)
+ return;
+
+ ksba_reader_release (ctx->u2.reader);
xfree (ctx);
}
@@ -630,6 +640,7 @@
return rc;
}
+ (*ctx)->u2.writer = w;
*r_writer = w;
return 0;
}
@@ -654,5 +665,9 @@
void
gpgsm_destroy_writer (Base64Context ctx)
{
+ if (!ctx)
+ return;
+
+ ksba_writer_release (ctx->u2.writer);
xfree (ctx);
}
More information about the Gnupg-commits
mailing list