summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d5a7b3a)
raw | patch | inline | side by side (parent: d5a7b3a)
author | Josh Andler <scislac@gmail.com> | |
Wed, 16 Dec 2009 21:27:19 +0000 (13:27 -0800) | ||
committer | Josh Andler <scislac@gmail.com> | |
Wed, 16 Dec 2009 21:27:19 +0000 (13:27 -0800) |
diff --git a/src/bind/javabind.cpp b/src/bind/javabind.cpp
index f7022584f73624bfa6a28a9603369856afd9632d..6dc8c9a9bb2b24d1615c0f3abfbd1a03d57f2a5d 100644 (file)
--- a/src/bind/javabind.cpp
+++ b/src/bind/javabind.cpp
default:
{
err("Unknown value type: %d", v.getType());
+ delete [] jvals;
return false;
}
}
return false;
}
}
- delete jvals;
+ delete [] jvals;
String errStr = getException();
if (errStr.size()>0)
{
default:
{
err("Unknown value type: %d", v.getType());
+ delete [] jvals;
return false;
}
}
return false;
}
}
- delete jvals;
+ delete [] jvals;
String errStr = getException();
if (errStr.size()>0)
{
index 40f456bd6c146da3ca011ef1e65a59edc54b4436..1e915ab0a4160fcdb31b16ddcf117d89ce2cf776 100644 (file)
--- a/src/dom/util/ziptool.cpp
+++ b/src/dom/util/ziptool.cpp
ZipEntry *ze = new ZipEntry();
if (!ze->readFile(fileName, comment))
{
+ delete ze;
return NULL;
}
entries.push_back(ze);
diff --git a/src/extension/dxf2svg/entities2elements.cpp b/src/extension/dxf2svg/entities2elements.cpp
index cf42dac32f406483177b29fb8f81dedeb6bf912f..ab160e2653de38561a92ce9952ac462a761a42b9 100644 (file)
// 2 is pline2polygon
- char delim[1];
+ char delim[2];
double mag_bulge = 0;
double prev_mag_bulge = 0;
@@ -185,7 +185,7 @@ void lwpline2svg(lwpolyline pline, int type, int precision, char * units, double
// 2 is pline2polygon
- char delim[1];
+ char delim[2];
double mag_bulge = 0;
double prev_mag_bulge = 0;
diff --git a/src/extension/internal/emf-win32-inout.cpp b/src/extension/internal/emf-win32-inout.cpp
index f400a36497008c5da1080c66f3c81cd6f5e13b21..9d25f3a7f17bba28443e4e6b7bd78b8eff7f8cc5 100644 (file)
/* Print document */
ret = mod->begin(doc);
if (ret) {
+ g_free(oldoutput);
throw Inkscape::Extension::Output::save_failed();
}
sp_item_invoke_print(mod->base, &context);
index cc8489302d2c73da43173e14eba0be3fc2a49f19..46e0361ce5740941dc444a00dfa0f66fe675ad8d 100644 (file)
}
}
- delete e;
- delete work;
+ delete [] e;
+ delete [] work;
}
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
index c2d417f2c03d750dbcb3e54983fab76f92aca3d8..ba00fe3435e82bcadeedac8c6ee42f32afaed8bb 100644 (file)
delete builder;
g_free(docname);
delete pdf_doc;
+ delete dlg;
// Restore undo
sp_document_set_undo_sensitive(doc, saved);
diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
index 00bd8fa4d8df9e00b2f09492381cd60b99cdd275..b9583545fb3ed237f0b336769b625aa775e5f11f 100644 (file)
@@ -1536,7 +1536,7 @@ Inkscape::XML::Node *SvgBuilder::_createImage(Stream *str, int width, int height
}
png_write_row(png_ptr, (png_bytep)buffer);
}
- delete buffer;
+ delete [] buffer;
} else if (color_map) {
image_stream = new ImageStream(str, width,
color_map->getNumPixelComps(),
@@ -1575,7 +1575,7 @@ Inkscape::XML::Node *SvgBuilder::_createImage(Stream *str, int width, int height
png_write_row(png_ptr, (png_bytep)buffer);
}
}
- delete buffer;
+ delete [] buffer;
} else { // A colormap must be provided, so quit
png_destroy_write_struct(&png_ptr, &info_ptr);
diff --git a/src/inkjar/jar.cpp b/src/inkjar/jar.cpp
index d53901de5be5b67e4b7f7d460ab4df294ce83d5f..6897cb317de0fe0ab9e45eec444159e484f39951 100644 (file)
--- a/src/inkjar/jar.cpp
+++ b/src/inkjar/jar.cpp
JarFile::JarFile(gchar const*new_filename)
{
- _filename = strdup(new_filename);
+ _filename = g_strdup(new_filename);
_last_filename = NULL;
fd = -1;
}
// use strdup
gchar *JarFile::get_last_filename() const
{
- return (_last_filename != NULL ? strdup(_last_filename) : NULL);
+ return (_last_filename != NULL ? g_strdup(_last_filename) : NULL);
}
JarFile::~JarFile()
if (_filename == NULL)
_filename = NULL;
else
- _filename = strdup(rhs._filename);
+ _filename = g_strdup(rhs._filename);
if (_last_filename == NULL)
_last_filename = NULL;
else
- _last_filename = strdup(rhs._last_filename);
+ _last_filename = g_strdup(rhs._last_filename);
fd = rhs.fd;
return *this;
index f389fc746af756533f509cdfc098ad56dee7eaa5..7fef86c4a3516773fc02644558d3b37654c82f80 100644 (file)
PRIVATE (result) = (CRCascadePriv *)g_try_malloc (sizeof (CRCascadePriv));
if (!PRIVATE (result)) {
+ g_free(result);
cr_utils_trace_info ("Out of memory");
return NULL;
}