r502: modified ldb to allow the use of an external pool memory
[kai/samba.git] / source / lib / ldb / tools / ldbadd.c
index 15febb76e787db9401dda6bb9807def0bb6ada7c..6d89f67e0fed96af921e0b9c1f0004c811ab23cb 100644 (file)
@@ -55,7 +55,7 @@ static int process_file(struct ldb_context *ldb, FILE *f)
        struct ldb_ldif *ldif;
        int ret, count=0;
 
-       while ((ldif = ldif_read_file(f))) {
+       while ((ldif = ldif_read_file(ldb, f))) {
                if (ldif->changetype != LDB_CHANGETYPE_ADD &&
                    ldif->changetype != LDB_CHANGETYPE_NONE) {
                        fprintf(stderr, "Only CHANGETYPE_ADD records allowed\n");
@@ -70,7 +70,7 @@ static int process_file(struct ldb_context *ldb, FILE *f)
                } else {
                        count++;
                }
-               ldif_read_free(ldif);
+               ldif_read_free(ldb, ldif);
        }
 
        return count;