svn commit: samba r14024 - in trunk/source/printing: .

jra at samba.org jra at samba.org
Wed Mar 8 06:42:46 GMT 2006


Author: jra
Date: 2006-03-08 06:42:45 +0000 (Wed, 08 Mar 2006)
New Revision: 14024

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14024

Log:
My last bug fix still left a potential null deref.
C- "must try harder" :-).
Jeremy.

Modified:
   trunk/source/printing/print_generic.c


Changeset:
Modified: trunk/source/printing/print_generic.c
===================================================================
--- trunk/source/printing/print_generic.c	2006-03-08 06:42:39 UTC (rev 14023)
+++ trunk/source/printing/print_generic.c	2006-03-08 06:42:45 UTC (rev 14024)
@@ -200,16 +200,17 @@
 			*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;



More information about the samba-cvs mailing list