Bug 901820 - Part 3. comm-cetral part of replacing nsCRT::strdup. r=Neil, a=jcranmer
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 12 Aug 2013 17:12:34 +0900
changeset 16417 3dabad3a7bc974af517f25d4f873e150316de8cd
parent 16416 3d4ecfb6eeb2b781394c24543094a15245f0e3b5
child 16418 480f28c2f35fb4cbc3ccaf84f757a4536a8d84c7
push id1019
push userbugzilla@standard8.plus.com
push dateMon, 28 Oct 2013 22:08:40 +0000
treeherdercomm-beta@c81d5f517a5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil, jcranmer
bugs901820
Bug 901820 - Part 3. comm-cetral part of replacing nsCRT::strdup. r=Neil, a=jcranmer
ldap/xpcom/src/nsLDAPMessage.cpp
--- a/ldap/xpcom/src/nsLDAPMessage.cpp
+++ b/ldap/xpcom/src/nsLDAPMessage.cpp
@@ -337,17 +337,17 @@ nsLDAPMessage::IterateAttributes(uint32_
     if (!attr) {
         return IterateAttrErrHandler(ldap_get_lderrno(mConnectionHandle, 0, 0),
                                      aAttrCount, aAttributes, position);
     }
 
     // if we're getting attributes, try and fill in the first field
     //
     if (getP) {
-        (*aAttributes)[0] = nsCRT::strdup(attr);
+        (*aAttributes)[0] = NS_strdup(attr);
         if (!(*aAttributes)[0]) {
             ldap_memfree(attr);
             nsMemory::Free(*aAttributes);
             return NS_ERROR_OUT_OF_MEMORY;
         }
 
         // note that we start counting again, in order to keep our place in 
         // the array so that we can unwind gracefully and avoid leakage if
@@ -385,17 +385,17 @@ nsLDAPMessage::IterateAttributes(uint32_
             //
             break;
 
         } else if (getP) {
 
             // if ldap_next_attribute did return successfully, and 
             // we're supposed to fill in a value, do so.
             //
-            (*aAttributes)[*aAttrCount] = nsCRT::strdup(attr);
+            (*aAttributes)[*aAttrCount] = NS_strdup(attr);
             if (!(*aAttributes)[*aAttrCount]) {
                 ldap_memfree(attr);
                 return IterateAttrErrHandler(LDAP_NO_MEMORY, aAttrCount, 
                                              aAttributes, position);
             }
        
         }
         ldap_memfree(attr);