#include "keydb.h"
#include "keyid.h"
#include "ll.h"
+#include "mem.h"
#include "stats.h"
/**
* TODO: The problem is the object has pointers that
* need freed too.
*/
- llfree(curll, free);
+ llfree(curll, free_statskey);
hashtable[i] = NULL;
}
elements = 0;
{
struct stats_key *key = NULL;
+ if (keyid == 0) {
+ return NULL;
+ }
+
key = findinhash(keyid);
if (key == NULL) {
key = malloc(sizeof(*key));