qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [1/6] qpid-proton git commit: PROTON-1418: c pn_logf() leaks memory on each call
Date Mon, 27 Feb 2017 18:04:49 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 3cb2ace54 -> 2dae68d6a


PROTON-1418: c pn_logf() leaks memory on each call

Fixed and made more efficient - no allocation.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/57e6abae
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/57e6abae
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/57e6abae

Branch: refs/heads/master
Commit: 57e6abaec80b812b55be6317e948494ec93220da
Parents: 3cb2ace
Author: Alan Conway <aconway@redhat.com>
Authored: Mon Feb 27 11:25:37 2017 -0500
Committer: Alan Conway <aconway@redhat.com>
Committed: Mon Feb 27 11:25:37 2017 -0500

----------------------------------------------------------------------
 proton-c/src/core/log.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/57e6abae/proton-c/src/core/log.c
----------------------------------------------------------------------
diff --git a/proton-c/src/core/log.c b/proton-c/src/core/log.c
index ff96ff0..60c72e7 100644
--- a/proton-c/src/core/log.c
+++ b/proton-c/src/core/log.c
@@ -49,9 +49,7 @@ void pn_log_logger(pn_logger_t new_logger) {
 }
 
 void pn_vlogf_impl(const char *fmt, va_list ap) {
-    pn_string_t *msg = pn_string("");
-    pn_string_vformat(msg, fmt, ap);
-    fprintf(stderr, "%s\n", pn_string_get(msg));
+    vfprintf(stderr, fmt, ap);
 }
 
 /**@internal


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message