summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-04-23 08:31:10 +0000
committerAndrew Tridgell <tridge@samba.org>2000-04-23 08:31:10 +0000
commit4c889d08aed3cebba54abbc96f28a2d1c545a4b5 (patch)
tree492c8a3d7aef2f0b1641ae393e3963e54628ae7a
parentb7c7a4d564d36885aa7c3efb2a87caec470df7fe (diff)
downloadsamba-4c889d08aed3cebba54abbc96f28a2d1c545a4b5.tar.gz
samba-4c889d08aed3cebba54abbc96f28a2d1c545a4b5.tar.xz
samba-4c889d08aed3cebba54abbc96f28a2d1c545a4b5.zip
fixed a memory leak I caused last week with my lines[] changes
-rw-r--r--source/printing/nt_printing.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c
index 848344f15e9..c30a35e26fc 100644
--- a/source/printing/nt_printing.c
+++ b/source/printing/nt_printing.c
@@ -390,7 +390,6 @@ static uint32 get_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr,
fstring driver_name;
fstring architecture;
NT_PRINTER_DRIVER_INFO_LEVEL_3 *info = NULL;
- char *line;
fstring p;
char *v;
int i=0;
@@ -422,12 +421,8 @@ static uint32 get_a_printer_driver_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 **info_ptr,
ZERO_STRUCTP(info);
- /* allocate a 4Kbytes buffer for parsing lines */
- if((line=(char *)malloc(4096*sizeof(char))) == NULL)
- goto err;
-
for (lcount=0; lines[lcount]; lcount++) {
- line = lines[lcount];
+ char *line = lines[lcount];
v=strncpyn(p, line, sizeof(p), ':');
if (v==NULL)
{