[git] Assuan - branch, master, updated. libassuan-2.4.3-4-g62f3123

by NIIBE Yutaka cvs at cvs.gnupg.org
Wed May 31 13:21:00 CEST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPC library used by GnuPG".

The branch, master has been updated
       via  62f3123d3877c8a84961e5f907bf959d4593fa5c (commit)
      from  b26b73d04bff10852382113ae361ea5726661510 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 62f3123d3877c8a84961e5f907bf959d4593fa5c
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Wed May 31 20:18:53 2017 +0900

    Use gpgrt_free to release memory allocated by gpgrt_asprintf.
    
    * src/assuan-logging.c (_assuan_log_control_channel): Use gpgrt_free.
    * src/debug.c (_assuan_debug, _assuan_debug_add, _assuan_debug_end):
    Likewise.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/src/assuan-logging.c b/src/assuan-logging.c
index ca87488..fd47582 100644
--- a/src/assuan-logging.c
+++ b/src/assuan-logging.c
@@ -296,7 +296,7 @@ _assuan_log_control_channel (assuan_context_t ctx, int outbound,
   else if (outbuf)
     {
       ctx->log_cb (ctx, ctx->log_cb_data, ASSUAN_LOG_CONTROL, outbuf);
-      free (outbuf);
+      gpgrt_free (outbuf);
     }
 #undef TOHEX
 #undef CHANNEL_FMT
diff --git a/src/debug.c b/src/debug.c
index 9ef6237..9fe9f20 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -65,7 +65,7 @@ _assuan_debug (assuan_context_t ctx, unsigned int cat, const char *format, ...)
   if (res < 0)
     return;
   ctx->log_cb (ctx, ctx->log_cb_data, cat, msg);
-  free (msg);
+  gpgrt_free (msg);
   gpg_err_set_errno (saved_errno);
 }
 
@@ -111,12 +111,12 @@ _assuan_debug_add (assuan_context_t ctx, void **line, const char *format, ...)
   va_end (arg_ptr);
   if (res < 0)
     {
-      free (*line);
+      gpgrt_free (*line);
       *line = NULL;
     }
   res = gpgrt_asprintf (&result, "%s%s", *(char **) line, toadd);
-  free (toadd);
-  free (*line);
+  gpgrt_free (toadd);
+  gpgrt_free (*line);
   if (res < 0)
     *line = NULL;
   else
@@ -134,7 +134,7 @@ _assuan_debug_end (assuan_context_t ctx, void **line, unsigned int cat)
 
   /* Force logging here by using category ~0.  */
   _assuan_debug (ctx, ~0, "%s", *line);
-  free (*line);
+  gpgrt_free (*line);
   *line = NULL;
 }
 

-----------------------------------------------------------------------

Summary of changes:
 src/assuan-logging.c |  2 +-
 src/debug.c          | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
IPC library used by GnuPG
http://git.gnupg.org




More information about the Gnupg-commits mailing list