diff --git a/daemon/control_ng.c b/daemon/control_ng.c index 461b008c2..c3b63326a 100644 --- a/daemon/control_ng.c +++ b/daemon/control_ng.c @@ -149,8 +149,6 @@ int control_ng_process(str *buf, const endpoint_t *sin, char *addr, // init decode buffer object ngbuf = obj_alloc0("ng_buffer", sizeof(*ngbuf), __ng_buffer_free); - mutex_init(&ngbuf->lock); - mutex_lock(&ngbuf->lock); if (ref) ngbuf->ref = obj_get_o(ref); // hold until we're done diff --git a/include/control_ng.h b/include/control_ng.h index 61b84615d..f6883897a 100644 --- a/include/control_ng.h +++ b/include/control_ng.h @@ -61,7 +61,6 @@ struct control_ng { struct ng_buffer { struct obj obj; - mutex_t lock; bencode_buffer_t buffer; struct obj *ref; }; @@ -78,7 +77,6 @@ int control_ng_process(str *buf, const endpoint_t *sin, char *addr, void (*cb)(str *, str *, const endpoint_t *, void *), void *p1, struct obj *); INLINE void ng_buffer_release(struct ng_buffer *ngbuf) { - mutex_unlock(&ngbuf->lock); obj_put(ngbuf); }