]> git.cameronkatri.com Git - cgit.git/blobdiff - cache.c
shared: remove return value from cgit_free_commitinfo()
[cgit.git] / cache.c
diff --git a/cache.c b/cache.c
index df1b4a31b56dfc9520c57706587f0159bc0b72d1..6736a017b2fce59608dac7318cbafac518045c3c 100644 (file)
--- a/cache.c
+++ b/cache.c
@@ -61,8 +61,9 @@ static int open_slot(struct cache_slot *slot)
        if (bufz)
                bufkeylen = bufz - slot->buf;
 
-       slot->match = bufkeylen == slot->keylen &&
-           !memcmp(slot->key, slot->buf, bufkeylen + 1);
+       if (slot->key)
+               slot->match = bufkeylen == slot->keylen &&
+                   !memcmp(slot->key, slot->buf, bufkeylen + 1);
 
        return 0;
 }