summaryrefslogtreecommitdiffstats
path: root/src/xml/repr-io.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-10-18 16:44:48 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-10-18 16:44:48 +0000
commitc6f1fa0dfb5beaac7b0781213711028b511c5f6e (patch)
tree3712e7c481f312bde6cb19d9b760ad0ba6f48f2a /src/xml/repr-io.cpp
parentUpdate to trunk (diff)
parentfix memory reallocation (diff)
downloadinkscape-c6f1fa0dfb5beaac7b0781213711028b511c5f6e.tar.gz
inkscape-c6f1fa0dfb5beaac7b0781213711028b511c5f6e.zip
Update to trunk
(bzr r11950.1.185)
Diffstat (limited to 'src/xml/repr-io.cpp')
-rw-r--r--src/xml/repr-io.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp
index f7e75a83b..54eff00bc 100644
--- a/src/xml/repr-io.cpp
+++ b/src/xml/repr-io.cpp
@@ -78,11 +78,14 @@ public:
XmlSource()
: filename(0),
encoding(0),
- fp(0),
+ fp(NULL),
firstFewLen(0),
+ LoadEntities(false),
+ cachedData(),
+ cachedPos(0),
dummy("x"),
- instr(0),
- gzin(0)
+ instr(NULL),
+ gzin(NULL)
{
for (int k=0;k<4;k++)
{
@@ -191,7 +194,7 @@ int XmlSource::setFile(char const *filename, bool load_entities=false)
buffer[len] = 0;
this->cachedData += buffer;
}
- free(buffer);
+ delete[] buffer;
// Check for SYSTEM or PUBLIC entities and remove them from the cache
GMatchInfo *info;