pstrcpy( line, v );
DEBUGADD(6,("%d:%s:%d\n", i, line, strlen(line)));
+
+ /* add one extra unit16 for the second terminating NULL */
- if ( (tuary=Realloc(*uni_array, (j+strlen(line)+2)*sizeof(uint16))) == NULL ) {
+ if ( (tuary=Realloc(*uni_array, (j+1+strlen(line)+2)*sizeof(uint16))) == NULL ) {
DEBUG(2,("init_unistr_array: Realloc error\n" ));
return 0;
} else
}
if (*uni_array) {
+ /* special case for ""; we need to add both NULL's here */
+ if (!j)
+ (*uni_array)[j++]=0x0000;
(*uni_array)[j]=0x0000;
}
fill_printer_driver_info_6(info, driver, servername);
free_a_printer(&printer,2);
+ free_a_printer_driver(driver, 3);
return WERR_OK;
}