summaryrefslogtreecommitdiff
path: root/utils/ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/ps.c')
-rw-r--r--utils/ps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/ps.c b/utils/ps.c
index f604600b..344e6863 100644
--- a/utils/ps.c
+++ b/utils/ps.c
@@ -328,7 +328,7 @@ ids_add (struct ids *ids, id_t id)
{
if (ids->alloced == ids->num)
{
- ids->alloced *= 2;
+ ids->alloced = ids->alloced * 2 + 1;
ids->ids = realloc (ids->ids, ids->alloced * sizeof (id_t));
if (ids->ids == NULL)
error(8, ENOMEM, "Can't allocate id list");