summaryrefslogtreecommitdiff
path: root/source3/printing/pcap.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-06-24 19:51:23 +0000
committerGerald Carter <jerry@samba.org>2002-06-24 19:51:23 +0000
commit900fb62238be30cdc87bfd2bede6fdff611ebae5 (patch)
treecb5073f32d4faf1a3eee3392da04b3b09424d10f /source3/printing/pcap.c
parent24b67730bf7bbf4414df99129a3cc20aa93dc0da (diff)
downloadsamba-900fb62238be30cdc87bfd2bede6fdff611ebae5.tar.gz
samba-900fb62238be30cdc87bfd2bede6fdff611ebae5.tar.bz2
samba-900fb62238be30cdc87bfd2bede6fdff611ebae5.zip
printing merge from SAMBA_2_2. Ther server code looks to be in sync now.
Mostly formatting and s/free/SAFE_FREE/g changes with the two exceptions being * John driver init changes * Tim's printer enumeration bug fix (This used to be commit f7536762863811f96364e8acd3716bdb7d665bbf)
Diffstat (limited to 'source3/printing/pcap.c')
-rw-r--r--source3/printing/pcap.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c
index 920c6f354e..01e03c7c6b 100644
--- a/source3/printing/pcap.c
+++ b/source3/printing/pcap.c
@@ -111,7 +111,7 @@ static void ScanQconfig_fn(char *psz,void (*fn)(char *, char *))
iEtat = 0;
/* scan qconfig file for searching <printername>: */
- for (;(line = fgets_slash(NULL,sizeof(pstring),pfile)); free(line))
+ for (;(line = fgets_slash(NULL,sizeof(pstring),pfile)); SAFE_FREE(line))
{
if (*line == '*' || *line == 0)
continue;
@@ -181,7 +181,7 @@ static BOOL ScanQconfig(char *psz,char *pszPrintername)
if ((pfile = x_fopen(psz, O_RDONLY, 0)) == NULL)
{
DEBUG(0,( "Unable to open qconfig file %s for read!\n", psz));
- free(pName);
+ SAFE_FREE(pName);
return(False);
}
slprintf(pName, iLg + 9, "%s:",pszPrintername);
@@ -189,7 +189,7 @@ static BOOL ScanQconfig(char *psz,char *pszPrintername)
/*DEBUG(3,( " Looking for entry %s\n",pName));*/
iEtat = 0;
/* scan qconfig file for searching <printername>: */
- for (;(line = fgets_slash(NULL,sizeof(pstring),pfile)); free(line))
+ for (;(line = fgets_slash(NULL,sizeof(pstring),pfile)); SAFE_FREE(line))
{
if (*line == '*' || *line == 0)
continue;
@@ -208,8 +208,8 @@ static BOOL ScanQconfig(char *psz,char *pszPrintername)
{
/* name is found without stanza device */
/* probably a good printer ??? */
- free (line);
- free(pName);
+ SAFE_FREE (line);
+ SAFE_FREE(pName);
fclose(pfile);
return(True);
}
@@ -222,15 +222,15 @@ static BOOL ScanQconfig(char *psz,char *pszPrintername)
else if (strlocate(line,"device"))
{
/* it's a good virtual printer */
- free (line);
- free(pName);
+ SAFE_FREE (line);
+ SAFE_FREE(pName);
fclose(pfile);
return(True);
}
break;
}
}
- free (pName);
+ SAFE_FREE (pName);
x_fclose(pfile);
return(False);
}
@@ -288,7 +288,7 @@ BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname)
return(False);
}
- for (;(line = fgets_slash(NULL,sizeof(pstring),pfile)); free(line))
+ for (;(line = fgets_slash(NULL,sizeof(pstring),pfile)); SAFE_FREE(line))
{
if (*line == '#' || *line == 0)
continue;
@@ -307,7 +307,7 @@ BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname)
{
/* normalise the case */
pstrcpy(pszPrintername,p);
- free(line);
+ SAFE_FREE(line);
x_fclose(pfile);
return(True);
}
@@ -369,7 +369,7 @@ void pcap_printer_fn(void (*fn)(char *, char *))
return;
}
- for (;(line = fgets_slash(NULL,sizeof(pstring),pfile)); free(line))
+ for (;(line = fgets_slash(NULL,sizeof(pstring),pfile)); SAFE_FREE(line))
{
if (*line == '#' || *line == 0)
continue;