Index: db.c
===================================================================
RCS file: /cvsroot-dbmail/dbmail/Attic/db.c,v
retrieving revision 1.1.2.28
diff -u -r1.1.2.28 db.c
--- db.c	2003/11/20 15:34:42	1.1.2.28
+++ db.c	2003/11/20 22:49:34
@@ -1995,7 +1995,10 @@
 	  }
      }
      db_free_result();
-     
+     if(*nr_mailboxes==0) {
+	  /* none exist, none matched */
+          return 0;
+     }
      *mailboxes = (u64_t*) realloc (tmp, *nr_mailboxes * sizeof(u64_t));
      if (!*mailboxes) {
 	  trace(TRACE_ERROR, "%s,%s: realloc failed",
