]> git.sur5r.net Git - openldap/commitdiff
Fix extraneous call to ldap_msgfree.
authorHoward Chu <hyc@openldap.org>
Thu, 2 Sep 1999 12:08:43 +0000 (12:08 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 2 Sep 1999 12:08:43 +0000 (12:08 +0000)
servers/slapd/back-ldap/search.c

index eaeae0e7d07a060b3b56a66fa60cb53bca7cf272..31bab0f10532e0b7064e3b21b8260077952bf37b 100644 (file)
@@ -103,13 +103,13 @@ fail:             return( ldap_back_op_result(lc, op) );
                        e = ldap_first_entry(lc->ld,res);
                        ldap_send_entry(be, op, lc, e, attrs, attrsonly);
                        i++;
+                       ldap_msgfree(res);
                } else {
                        sres = ldap_result2error(lc->ld, res, 1);
                        ldap_get_option(lc->ld, LDAP_OPT_ERROR_STRING, &err);
                        ldap_get_option(lc->ld, LDAP_OPT_MATCHED_DN, &match);
                        rc = 0;
                }
-               ldap_msgfree(res);
                if (ab)
                        return (0);
                else if (rc == 0)