aerospike / aerospike-client-c

Aerospike C Client
Other
98 stars 103 forks source link

as_arraylist memory leak #90

Closed burlog closed 4 years ago

burlog commented 5 years ago

Steps to reproduce:

#include <aerospike/as_arraylist.h>

int main(int argc, char *argv[]) {
    as_arraylist list;
    as_arraylist_init(&list, 0, 8);
    as_arraylist_append_int64(&list, 3);
    as_arraylist_destroy(&list);
}

The static function as_arraylist_ensure in modules/common/src/main/aerospike/as_arraylist.c should probably also ensure that the free is set to true.

BrianNichols commented 5 years ago

This leak will be fixed in the next release. The workaround is to not set initial capacity to zero.

BrianNichols commented 4 years ago

C client 4.6.9 has been released.

https://www.aerospike.com/download/client/c/4.6.9/