lua: fix memory leak problem
[project/ubus.git] / libubus-req.c
index d44db51..2197f2a 100644 (file)
@@ -175,7 +175,7 @@ int ubus_complete_request(struct ubus_context *ctx, struct ubus_request *req,
        if (!registered) {
                uloop_fd_delete(&ctx->sock);
 
-               if (ctx->stack_depth)
+               if (!ctx->stack_depth)
                        ctx->pending_timer.cb(&ctx->pending_timer);
        }