Repository: qpid-proton Updated Branches: refs/heads/master f05810e95 -> 73d8ff9af
PROTON-870: Fix none_sasl.c to use pn_strdup instead of strdup This closes #24 Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/73d8ff9a Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/73d8ff9a Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/73d8ff9a Branch: refs/heads/master Commit: 73d8ff9af3e2745020157bca9338ea29848bb358 Parents: f05810e Author: dcristoloveanu <[email protected]> Authored: Mon Apr 27 17:44:05 2015 -0700 Committer: Andrew Stitcher <[email protected]> Committed: Tue Apr 28 00:10:32 2015 -0400 ---------------------------------------------------------------------- proton-c/src/sasl/none_sasl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/73d8ff9a/proton-c/src/sasl/none_sasl.c ---------------------------------------------------------------------- diff --git a/proton-c/src/sasl/none_sasl.c b/proton-c/src/sasl/none_sasl.c index 87f7917..ff962ac 100644 --- a/proton-c/src/sasl/none_sasl.c +++ b/proton-c/src/sasl/none_sasl.c @@ -25,6 +25,7 @@ #include "buffer.h" #include "protocol.h" #include "dispatch_actions.h" +#include "util.h" #include "engine/engine-internal.h" struct pni_sasl_t { @@ -93,7 +94,7 @@ void pn_sasl_allowed_mechs(pn_sasl_t *sasl0, const char *mechs) pni_sasl_t *sasl = get_sasl_internal(sasl0); if (!sasl) return; free(sasl->included_mechanisms); - sasl->included_mechanisms = mechs ? strdup(mechs) : NULL; + sasl->included_mechanisms = mechs ? pn_strdup(mechs) : NULL; if (strcmp(mechs, "ANONYMOUS")==0 ) { // If we do this on the client it is a hack to tell us that // no actual negatiation is going to happen and we can go @@ -165,7 +166,7 @@ void pni_sasl_set_user_password(pn_transport_t *transport, const char *user, con { pni_sasl_t *sasl = transport->sasl; sasl->username = user; - sasl->password = password ? strdup(password) : NULL; + sasl->password = password ? pn_strdup(password) : NULL; } const char *pn_sasl_get_user(pn_sasl_t *sasl0) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
