summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8839aab)
raw | patch | inline | side by side (parent: 8839aab)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 9 Jul 2014 19:33:27 +0000 (21:33 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 9 Jul 2014 19:33:27 +0000 (21:33 +0200) |
We cannot free the static memory and, thus, cannot destroy the object.
src/backend/collectd/unixsock.c | patch | blob | history | |
src/include/core/object.h | patch | blob | history |
index 7145e9d2dc45c387fade499c992428286ce2efac..b8bbbfe63c29fb638f5ceb5ede65f73b83126751 100644 (file)
long int count;
sdb_collectd_state_t state = SDB_COLLECTD_STATE_INIT;
- sdb_object_wrapper_t state_obj = SDB_OBJECT_WRAPPER_STATIC(&state,
- /* destructor = */ NULL);
+ sdb_object_wrapper_t state_obj = SDB_OBJECT_WRAPPER_STATIC(&state);
if (! user_data)
return -1;
index 42352b085876b48cbbaca7716670d05c4bc06d14..a92fb53945676f65fbbada4bfe4f680d22427093 100644 (file)
sdb_object_create_wrapper(const char *name,
void *data, void (*destructor)(void *));
-#define SDB_OBJECT_WRAPPER_STATIC(obj, destructor) \
- { SDB_OBJECT_INIT, (obj), (destructor) }
+#define SDB_OBJECT_WRAPPER_STATIC(obj) \
+ { SDB_OBJECT_INIT, (obj), /* destructor */ NULL }
/*
* sdb_object_deref: