diff --git a/mesh/mesh.c b/mesh/mesh.c
index 55204da..68cf0cd 100644
--- a/mesh/mesh.c
+++ b/mesh/mesh.c
struct join_data{
struct l_dbus_message *msg;
struct mesh_agent *agent;
- const char *sender;
+ char *sender;
const char *app_path;
struct mesh_node *node;
uint32_t disc_watch;
if (failed)
node_remove(join_pending->node);
+ l_free(join_pending->sender);
l_free(join_pending);
join_pending = NULL;
}
if (!join_pending)
return;
- if (join_pending->msg)
+ if (join_pending->msg) {
l_dbus_message_unref(join_pending->msg);
+ join_pending->msg = NULL;
+ }
acceptor_cancel(&mesh);
join_pending->disc_watch = 0;