Fix a variety of memory leaks
[asterisk/asterisk.git] / res / res_jabber.c
index a68864f..384b12c 100644 (file)
@@ -2292,6 +2292,7 @@ static void aji_handle_message(struct aji_client *client, ikspak *pak)
                /* insert will furtherly be added to message list */
                insert->from = ast_strdup(pak->from->full);
                if (!insert->from) {
+                       ast_free(insert);
                        ast_log(LOG_ERROR, "Memory allocation failure\n");
                        return;
                }