]> git.sur5r.net Git - openldap/commitdiff
res is already freed by ldap_parse_reference() (ITS#3190)
authorPierangelo Masarati <ando@openldap.org>
Thu, 17 Jun 2004 18:27:51 +0000 (18:27 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 17 Jun 2004 18:27:51 +0000 (18:27 +0000)
servers/slapd/back-meta/search.c

index a1002c92c51e30a4d770fb8c68a600e726a88936..1a2bf3d85d4e36ffd40ad9ec57778f8499cd4f57 100644 (file)
@@ -388,6 +388,7 @@ new_candidate:;
 
                                rc = ldap_parse_reference( lsc->ld, res,
                                                &references, &rs->sr_ctrls, 1 );
+                               res = NULL;
 
                                if ( rc != LDAP_SUCCESS ) {
                                        continue;
@@ -422,9 +423,6 @@ new_candidate:;
                                        rs->sr_ctrls = NULL;
                                }
 
-                               ldap_msgfree( res );
-                               res = NULL;
-
                        } else {
                                rs->sr_err = ldap_result2error( lsc->ld,
                                                res, 1 );