]> git.sur5r.net Git - openldap/commitdiff
ITS#2423 don't malloc prompt results
authorHoward Chu <hyc@openldap.org>
Sun, 6 Apr 2003 00:52:24 +0000 (00:52 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 6 Apr 2003 00:52:24 +0000 (00:52 +0000)
contrib/ldapsasl/ldapdb.c

index 2cf430291f0b536f636b388713cdef3c6bf0b917..a373127b0718ccc545546ff6c9af14e38b1a1da5 100644 (file)
@@ -70,10 +70,7 @@ static int ldapdb_interact(LDAP *ld, unsigned flags __attribute__((unused)),
                }
                if (p.bv_val)
                {
-                       in->result = gc->lp->utils->malloc(p.bv_len+1);
-                       if (!in->result)
-                               return LDAP_NO_MEMORY;
-                       strcpy((char *)in->result, p.bv_val);
+                       in->result = p.bv_val;
                        in->len = p.bv_len;
                }
        }