aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-04-21 00:40:30 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-04-21 00:40:30 +0200
commitc69c8048b456d1e51617c26bd9ddb2e9e10c658e (patch)
tree8734ce312efe7fe5cedf6eaf824e975afac489d0
parent5632eecd42a95976cfadb4a089ff5e62734cc743 (diff)
downloadxK-c69c8048b456d1e51617c26bd9ddb2e9e10c658e.tar.gz
xK-c69c8048b456d1e51617c26bd9ddb2e9e10c658e.tar.xz
xK-c69c8048b456d1e51617c26bd9ddb2e9e10c658e.zip
degesch: fix a potential SIGSEGV
-rw-r--r--degesch.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/degesch.c b/degesch.c
index e0c8904..b00e7b6 100644
--- a/degesch.c
+++ b/degesch.c
@@ -225,7 +225,7 @@ channel_user_destroy (struct channel_user *self)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// We keep references to channels in their users and buffers,
-// as well as in the name lookup table.
+// and weak references in the name lookup table.
struct channel
{
@@ -531,15 +531,15 @@ app_context_free (struct app_context *self)
if (self->ssl_ctx)
SSL_CTX_free (self->ssl_ctx);
- str_map_free (&self->irc_users);
- str_map_free (&self->irc_channels);
- str_map_free (&self->irc_buffer_map);
-
if (self->irc_user)
user_unref (self->irc_user);
free (self->irc_user_mode);
free (self->irc_user_host);
+ str_map_free (&self->irc_users);
+ str_map_free (&self->irc_channels);
+ str_map_free (&self->irc_buffer_map);
+
poller_free (&self->poller);
LIST_FOR_EACH (struct buffer, iter, self->buffers)