1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

Ensure print queue array is zeroed out before returning.

Jeremy.
(This used to be commit f0fac6a1e3)
This commit is contained in:
Jeremy Allison 2003-04-09 00:00:08 +00:00
parent b3e9dfc375
commit 4b5548d8dc

View File

@ -214,6 +214,7 @@ static int generic_queue_get(int snum, print_queue_struct **q, print_status_stru
queue = (print_queue_struct *)malloc(sizeof(print_queue_struct)*(numlines+1)); queue = (print_queue_struct *)malloc(sizeof(print_queue_struct)*(numlines+1));
if (queue) { if (queue) {
memset(queue, '\0', sizeof(print_queue_struct)*(numlines+1));
for (i=0; i<numlines; i++) { for (i=0; i<numlines; i++) {
/* parse the line */ /* parse the line */
if (parse_lpq_entry(snum,qlines[i], if (parse_lpq_entry(snum,qlines[i],