Ticket #78: xapian-java-bindings-delete.patch

File xapian-java-bindings-delete.patch, 659 bytes (added by Olly Betts, 19 years ago)

Patch to correct 2 misuses of delete to delete[]

  • native/Query.cc

     
    110110        jsize size = env->GetArrayLength(terms);
    111111        string *array = toArray(env, terms, size);
    112112        Query *q = new Query(op_table[op-1], array, array+size);
    113         delete array;
     113        delete[] array;
    114114        return _query->put(q);
    115115    CATCH(-1)
    116116}
     
    124124            queries[x] = _query->get(qid_ptr[x]);
    125125        }
    126126        Query *q = new Query(op_table[op-1], queries, queries+len);
    127         delete queries;
     127        delete[] queries;
    128128        return _query->put(q);
    129129    CATCH(-1)
    130130}