From 2eb9847ba8fb9f1b2437544c0b6ae11002949a1e Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Tue, 14 Apr 2009 15:53:04 -0600 Subject: [PATCH] Fixed memory leak in one off handlers. --- src/handler.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/handler.c b/src/handler.c index 31e0888..5f1eb16 100644 --- a/src/handler.c +++ b/src/handler.c @@ -112,6 +112,9 @@ void handler_fire_stanza(xmpp_conn_t * const conn, prev->next = item->next; else conn->handlers = item->next; + if (item->ns) xmpp_free(conn->ctx, item->ns); + if (item->name) xmpp_free(conn->ctx, item->name); + if (item->type) xmpp_free(conn->ctx, item->type); xmpp_free(conn->ctx, item); item = NULL; }