projects
/
onak.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cscvs to tla changeset 43
[onak.git]
/
hash.c
diff --git
a/hash.c
b/hash.c
index f07017a669d7e65342ce81637d801d0548bb9f59..e131d032b576281d1ad98e478b04185e57654cf2 100644
(file)
--- a/
hash.c
+++ b/
hash.c
@@
-13,6
+13,7
@@
#include "keydb.h"
#include "keyid.h"
#include "ll.h"
#include "keydb.h"
#include "keyid.h"
#include "ll.h"
+#include "mem.h"
#include "stats.h"
/**
#include "stats.h"
/**
@@
-55,7
+56,7
@@
void destroyhash(void)
* TODO: The problem is the object has pointers that
* need freed too.
*/
* TODO: The problem is the object has pointers that
* need freed too.
*/
- llfree(curll, free);
+ llfree(curll, free
_statskey
);
hashtable[i] = NULL;
}
elements = 0;
hashtable[i] = NULL;
}
elements = 0;
@@
-138,6
+139,10
@@
struct ll *hash_getkeysigs(uint64_t keyid)
{
struct stats_key *key = NULL;
{
struct stats_key *key = NULL;
+ if (keyid == 0) {
+ return NULL;
+ }
+
key = findinhash(keyid);
if (key == NULL) {
key = malloc(sizeof(*key));
key = findinhash(keyid);
if (key == NULL) {
key = malloc(sizeof(*key));