mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
r14023: My last bug fix still left a potential null deref.
C- "must try harder" :-). Jeremy.
This commit is contained in:
parent
b824245c4e
commit
9c55bf74ca
@ -200,16 +200,17 @@ static int generic_queue_get(const char *printer_name,
|
||||
*q = NULL;
|
||||
return 0;
|
||||
}
|
||||
memset(queue, '\0', sizeof(print_queue_struct)*(numlines+1));
|
||||
|
||||
for (i=0; i<numlines; i++) {
|
||||
/* parse the line */
|
||||
if (parse_lpq_entry(printing_type,qlines[i],
|
||||
&queue[qcount],status,qcount==0)) {
|
||||
qcount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
memset(queue, '\0', sizeof(print_queue_struct)*(numlines+1));
|
||||
for (i=0; i<numlines; i++) {
|
||||
/* parse the line */
|
||||
if (parse_lpq_entry(printing_type,qlines[i],
|
||||
&queue[qcount],status,qcount==0)) {
|
||||
qcount++;
|
||||
}
|
||||
}
|
||||
file_lines_free(qlines);
|
||||
*q = queue;
|
||||
return qcount;
|
||||
|
Loading…
x
Reference in New Issue
Block a user