aboutsummaryrefslogtreecommitdiff
path: root/src/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hash.c b/src/hash.c
index 035236c..d5eeba0 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -1,6 +1,6 @@
/*
* NetCosm - a MUD server
- * Copyright (C) 2015 Franklin Wei
+ * Copyright (C) 2016 Franklin Wei
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -17,6 +17,7 @@
*/
#include "hash.h"
+
#include <stdlib.h>
#include <string.h>
@@ -89,6 +90,7 @@ void hash_free(void *ptr)
while(node)
{
struct hash_node *next = node->next;
+
if(map->free_data)
map->free_data((void*)node->data);
if(map->free_key)