Fixed a memory leak in xlhtml.c

This commit is contained in:
slidedraw 2002-04-04 17:56:04 +00:00
parent 89c4cdb2d7
commit 578f23c51b
3 changed files with 7 additions and 10 deletions

View File

@ -80,9 +80,9 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \ DIST_COMMON = README ./stamp-h.in AUTHORS COPYING INSTALL Makefile.am \
Makefile.am Makefile.in NEWS aclocal.m4 config.guess config.h.in \ Makefile.in NEWS aclocal.m4 config.guess config.h.in config.sub \
config.sub configure configure.in install-sh missing mkinstalldirs configure configure.in install-sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)

View File

@ -83,7 +83,7 @@ man_MANS = xlhtml.1
bin_SCRIPTS = nsopen nsxlview bin_SCRIPTS = nsopen nsxlview
bin_PROGRAMS = xlhtml bin_PROGRAMS = xlhtml
LDADD = ../cole/libcole.a LDADD = ../cole/libcole.a
xlhtml_SOURCES = support.c xlhtml.c xlhtml_SOURCES = support.c xlhtml.c memwatch.c
xldump_SOURCES = xldump.c xldump_SOURCES = xldump.c
xlcdump_SOURCES = xlcdump.c xlcdump_SOURCES = xlcdump.c
AM_CFLAGS = -Wall -Wshadow -Wcast-align -Wpointer-arith AM_CFLAGS = -Wall -Wshadow -Wcast-align -Wpointer-arith
@ -97,7 +97,7 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ LIBS = @LIBS@
xlhtml_OBJECTS = support.o xlhtml.o xlhtml_OBJECTS = support.o xlhtml.o memwatch.o
xlhtml_LDADD = $(LDADD) xlhtml_LDADD = $(LDADD)
xlhtml_DEPENDENCIES = ../cole/libcole.a xlhtml_DEPENDENCIES = ../cole/libcole.a
xlhtml_LDFLAGS = xlhtml_LDFLAGS =

View File

@ -27,7 +27,6 @@
#include "tuneable.h" #include "tuneable.h"
#include "xlhtml.h" #include "xlhtml.h"
static char SectionName[2][12] = /* The section of the Excel Stream where the workbooks are kept */ static char SectionName[2][12] = /* The section of the Excel Stream where the workbooks are kept */
{ {
"/Workbook", /*!< Excel 97 & 2000 */ "/Workbook", /*!< Excel 97 & 2000 */
@ -539,9 +538,7 @@ int main (int argc, char **argv)
exit(1); exit(1);
} }
/* For some reason, this loop core dumps on some */ for (i=0; i<max_strings; i++)
/* files from Central Europe...so it's commented out for now */
/* for (i=0; i<max_strings; i++)
{ {
if (str_array[i]) if (str_array[i])
{ {
@ -549,7 +546,7 @@ int main (int argc, char **argv)
free(str_array[i]->str); free(str_array[i]->str);
free(str_array[i]); free(str_array[i]);
} }
} */ }
for (i=0; i<(int)max_fonts; i++) for (i=0; i<(int)max_fonts; i++)
{ {