Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Assign default malloc/realloc/free if none provided. Fixes multiple r…

…uns inside gbd, and test cases.
  • Loading branch information...
commit 6917d157393ac32c85f73761c3cfc78f37a3d334 1 parent 9f829e2
Pat Wilson ZeroStride authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/ekvs.c
6 src/ekvs.c
View
@@ -46,6 +46,12 @@ int ekvs_open(ekvs* store, const char* path, const ekvs_opts* opts)
ekvs_realloc = opts->user_realloc;
ekvs_free = opts->user_free;
}
+ else
+ {
+ ekvs_malloc = malloc;
+ ekvs_realloc = realloc;
+ ekvs_free = free;
+ }
/* Allocate structure */
*store = ekvs_malloc(sizeof(struct _ekvs_db));
Please sign in to comment.
Something went wrong with that request. Please try again.