diff options
-rw-r--r-- | channel.c | 2 | ||||
-rw-r--r-- | nick.c | 2 | ||||
-rw-r--r-- | user.c | 2 | ||||
-rw-r--r-- | word.c | 2 |
4 files changed, 7 insertions, 1 deletions
@@ -55,9 +55,11 @@ struct channel_t *channel_get(int index) { void channel_free() { for(int i = 0; i < channel_count; i++) { free(channels[i].name); + free(channels[i].xmlpath); struct channel_file_t *file = channels[i].files; while(file) { struct channel_file_t *next = file->next; + free(file->path); free(file); file = next; } @@ -103,6 +103,6 @@ void nick_free() { free(nick); nick = next; } - free(nicks); + nicks = NULL; // nicks already free'd by first iteration pcre_free((void*)nick_pcre_tables); } @@ -44,6 +44,8 @@ struct user_t *user_get(char *nick) { void user_free() { struct user_t *user; for(int i = 0; i < USERS_MAX; i++) { + if(users[i].nick) + free(users[i].nick); user = users[i].next; while(user) { struct user_t *temp = user->next; @@ -37,6 +37,8 @@ struct word_t *word_get(char *name) { void word_free() { struct word_t *word; for(int i = 0; i < WORDS_MAX; i++) { + if(words[i].name) + free(words[i].name); word = words[i].next; while(word) { struct word_t *temp = word->next; |