You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2018/11/02 20:46:24 UTC

[04/50] qpid-proton git commit: PROTON-1798: [c] Fix leaks in tools/*.c, found by asan.

PROTON-1798: [c] Fix leaks in tools/*.c, found by asan.


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

Branch: refs/heads/go1
Commit: 0da413e6f5e8e0c3dbdf0db615336482460a6d5e
Parents: 6275c98
Author: Alan Conway <ac...@redhat.com>
Authored: Thu Sep 6 17:46:32 2018 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Fri Sep 7 09:45:50 2018 -0400

----------------------------------------------------------------------
 c/tools/msgr-recv.c    | 1 +
 c/tools/msgr-send.c    | 1 +
 c/tools/reactor-send.c | 1 +
 3 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0da413e6/c/tools/msgr-recv.c
----------------------------------------------------------------------
diff --git a/c/tools/msgr-recv.c b/c/tools/msgr-recv.c
index 729a8f8..3b2a24e 100644
--- a/c/tools/msgr-recv.c
+++ b/c/tools/msgr-recv.c
@@ -181,6 +181,7 @@ int main(int argc, char** argv)
 
     if (opts.password) {
         rc = pn_messenger_set_password(messenger, opts.password);
+        free(opts.password);
         check_messenger(messenger);
         check( rc == 0, "Failed to set password" );
     }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0da413e6/c/tools/msgr-send.c
----------------------------------------------------------------------
diff --git a/c/tools/msgr-send.c b/c/tools/msgr-send.c
index 75b5931..d4299cf 100644
--- a/c/tools/msgr-send.c
+++ b/c/tools/msgr-send.c
@@ -212,6 +212,7 @@ int main(int argc, char** argv)
 
     if (opts.password) {
         rc = pn_messenger_set_password(messenger, opts.password);
+        free(opts.password);
         check( rc == 0, "Failed to set password" );
     }
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0da413e6/c/tools/reactor-send.c
----------------------------------------------------------------------
diff --git a/c/tools/reactor-send.c b/c/tools/reactor-send.c
index f182193..1b7870f 100644
--- a/c/tools/reactor-send.c
+++ b/c/tools/reactor-send.c
@@ -414,6 +414,7 @@ int main(int argc, char** argv)
 
   pn_handler_free(sh);
   addresses_free(&opts.targets);
+  free(opts.password);
   return 0;
 }
 


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