#include "portable.h"
#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
#include "slap.h"
#include "back-ldbm.h"
#include "proto-back-ldbm.h"
-extern Attribute *attr_find();
-
int
ldbm_back_compare(
Backend *be,
char *matched;
Entry *e;
Attribute *a;
- int i, rc;
+ int rc;
/* get entry with reader lock */
if ( (e = dn2entry_r( be, dn, &matched )) == NULL ) {
send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched, "" );
+
+ if(matched == NULL) free(matched);
return( 1 );
}