diff options
author | NIIBE Yutaka <[email protected]> | 2017-05-31 11:18:53 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2017-05-31 11:18:53 +0000 |
commit | 62f3123d3877c8a84961e5f907bf959d4593fa5c (patch) | |
tree | e21f0a1870bd570e7fd9f5eafcc8ac23c0500914 /src/debug.c | |
parent | build: Use macOS' compatibility macros to enable all features. (diff) | |
download | libassuan-62f3123d3877c8a84961e5f907bf959d4593fa5c.tar.gz libassuan-62f3123d3877c8a84961e5f907bf959d4593fa5c.zip |
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 <[email protected]>
Diffstat (limited to 'src/debug.c')
-rw-r--r-- | src/debug.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |