summaryrefslogtreecommitdiff
path: root/rcon.c
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-10 19:01:39 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-10 19:01:39 +0200
commit320f600cd980230b2b2e34c7256c9564af6afae9 (patch)
treefd64b3545a386255ddccb71d3f97dd141b0d14a9 /rcon.c
parentaf7dbbcbc9fe89deb4951d45b0f6ce839199c88b (diff)
Add some basic memory tracking infrastructure while hacking
Diffstat (limited to 'rcon.c')
-rw-r--r--rcon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rcon.c b/rcon.c
index a9a6328..be2f279 100644
--- a/rcon.c
+++ b/rcon.c
@@ -31,7 +31,7 @@ rcon_free(struct uring_task *task)
fprintf(stderr, "%s: called with task 0x%p and idle 0x%p\n", __func__, task, rcon);
rcon->server->rcon = NULL;
- free(rcon);
+ xfree(rcon);
}
void
@@ -53,6 +53,7 @@ rcon_delete(struct cfg *cfg, struct server *server)
fprintf(stderr, "%s called, closing fd %i\n", __func__, rcon->task.fd);
uring_cancel(cfg, &rcon->task);
+ /* FIXME: Won't the refcount be wrong? */
uring_task_put(cfg, &rcon->task);
server->rcon = NULL;
}