summaryrefslogtreecommitdiff
path: root/source3
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
commitcc229d7042e4fc3ec9743ce37e5db0c0d4b97186 (patch)
tree55b68925775f7dc22cb95c03879107461b7202b3 /source3
parentb2461e93dd7c94b94ddf167659ed3515b1c90b44 (diff)
downloadsamba-cc229d7042e4fc3ec9743ce37e5db0c0d4b97186.tar.gz
samba-cc229d7042e4fc3ec9743ce37e5db0c0d4b97186.tar.bz2
samba-cc229d7042e4fc3ec9743ce37e5db0c0d4b97186.zip
fixed a memory leak I caused last week with my lines[] changes
(This used to be commit 4c889d08aed3cebba54abbc96f28a2d1c545a4b5)
Diffstat (limited to 'source3')
-rw-r--r--source3/printing/nt_printing.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 848344f15e..c30a35e26f 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/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)
{