Merge pull request #453 from fyrz/SimpleCExampleSigSegv
Memory issue fix in c_simple_example
This commit is contained in:
commit
93b35c299b
@ -30,7 +30,7 @@ int main(int argc, char **argv) {
|
|||||||
const char key[] = "key";
|
const char key[] = "key";
|
||||||
const char *value = "value";
|
const char *value = "value";
|
||||||
rocksdb_put(db, writeoptions, key, strlen (key), value, \
|
rocksdb_put(db, writeoptions, key, strlen (key), value, \
|
||||||
strlen (value), &err);
|
strlen (value) + 1, &err);
|
||||||
assert(!err);
|
assert(!err);
|
||||||
// Get value
|
// Get value
|
||||||
rocksdb_readoptions_t *readoptions = rocksdb_readoptions_create();
|
rocksdb_readoptions_t *readoptions = rocksdb_readoptions_create();
|
||||||
|
Loading…
Reference in New Issue
Block a user