diff --git a/src/memory.c b/src/memory.c
index c31b30efe29b109cf3ae7c73055a48502c5b21fb..63c3e6ac12c5bfa63d5078ff9f0527c25b173974 100644 (file)
--- a/src/memory.c
+++ b/src/memory.c
#elif defined(HAVE_LIBKSTAT)
/* getpagesize(3C) tells me this does not fail.. */
pagesize = getpagesize ();
- if (get_kstat (&ksp, "unix", 0, "system_pages"))
+ if (get_kstat (&ksp, "unix", 0, "system_pages") != 0)
+ {
ksp = NULL;
+ return (-1);
+ }
#endif /* HAVE_LIBKSTAT */
return (0);