]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/hash.c
fce: afpd: fix event names array
[netatalk.git] / etc / afpd / hash.c
index 4861e8112589a7ffb8af67cd4ede9ad741067fb2..a7c624d48b4c8603ceb9aca2ed046001d89b9da7 100644 (file)
@@ -982,8 +982,10 @@ int main(void)
         "s                      switch to non-functioning allocator\n"
         "q                      quit";
 
-    if (!h)
+    if (!h) {
         puts("hash_create failed");
+        return 1;
+    }
 
     for (;;) {
         if (prompt)
@@ -1012,6 +1014,7 @@ int main(void)
                 puts("out of memory");
                 free((void *) key);
                 free(val);
+                break;
             }
 
             if (!hash_alloc_insert(h, key, val)) {