diff --git a/src/ptserver/ptprocs.c b/src/ptserver/ptprocs.c index 5e66fdf773..4ce1cbf92f 100644 --- a/src/ptserver/ptprocs.c +++ b/src/ptserver/ptprocs.c @@ -1538,6 +1538,7 @@ put_prentries(struct prentry *tentry, prentries *bulkentries) entry = bulkentries->prentries_val; entry += bulkentries->prentries_len; + memset(entry, 0, sizeof(*entry)); entry->flags = tentry->flags >> PRIVATE_SHIFT; if (entry->flags == 0) { entry->flags = @@ -1552,7 +1553,6 @@ put_prentries(struct prentry *tentry, prentries *bulkentries) entry->nusers = tentry->nusers; entry->count = tentry->count; strncpy(entry->name, tentry->name, PR_MAXNAMELEN); - memset(entry->reserved, 0, sizeof(entry->reserved)); bulkentries->prentries_len++; return 0; }