------------------------------------------------------------ revno: 12648 revision-id: squid3@treenet.co.nz-20131103084047-7iqrhv3o590zg85p parent: squid3@treenet.co.nz-20131103083757-bjt1kj7pg3dbhwqv author: Markus Moeller committer: Amos Jeffries branch nick: 3.3 timestamp: Sun 2013-11-03 01:40:47 -0700 message: kerberos_ldap_group: fix LDAP string duplication ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20131103084047-7iqrhv3o590zg85p # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: 61af1082b3f93ce8afc9aa4a8a24b468971c8b52 # timestamp: 2013-11-03 08:45:20 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20131103083757-\ # bjt1kj7pg3dbhwqv # # Begin patch === modified file 'helpers/external_acl/kerberos_ldap_group/support_ldap.cc' --- helpers/external_acl/kerberos_ldap_group/support_ldap.cc 2012-12-30 07:46:11 +0000 +++ helpers/external_acl/kerberos_ldap_group/support_ldap.cc 2013-11-03 08:40:47 +0000 @@ -643,11 +643,11 @@ memset(url, 0, sizeof(*url)); #ifdef HAVE_LDAP_URL_LUD_SCHEME if (ssl) - url->lud_scheme = (char *) "ldaps"; + url->lud_scheme = xstrdup("ldaps"); else - url->lud_scheme = (char *) "ldap"; + url->lud_scheme = xstrdup("ldap"); #endif - url->lud_host = host; + url->lud_host = xstrdup(host); url->lud_port = port; #ifdef HAVE_LDAP_SCOPE_DEFAULT url->lud_scope = LDAP_SCOPE_DEFAULT; @@ -710,9 +710,9 @@ url = (LDAPURLDesc *) xmalloc(sizeof(*url)); memset(url, 0, sizeof(*url)); #ifdef HAVE_LDAP_URL_LUD_SCHEME - url->lud_scheme = (char *) "ldaps"; + url->lud_scheme = xstrdup("ldaps"); #endif - url->lud_host = host; + url->lud_host = xstrdup(host); url->lud_port = port; #ifdef HAVE_LDAP_SCOPE_DEFAULT url->lud_scope = LDAP_SCOPE_DEFAULT;