From 2e2d12079c6034d82a8d70db7e2c8a0f0199ff5f Mon Sep 17 00:00:00 2001 From: Josh Andler Date: Wed, 16 Dec 2009 13:27:19 -0800 Subject: Patches 3-11 from 488862 for a number of memleaks and allocation/deallocation issues. (bzr r8891) --- src/inkjar/jar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/inkjar/jar.cpp') diff --git a/src/inkjar/jar.cpp b/src/inkjar/jar.cpp index d53901de5..6897cb317 100644 --- a/src/inkjar/jar.cpp +++ b/src/inkjar/jar.cpp @@ -66,7 +66,7 @@ namespace Inkjar { JarFile::JarFile(gchar const*new_filename) { - _filename = strdup(new_filename); + _filename = g_strdup(new_filename); _last_filename = NULL; fd = -1; } @@ -75,7 +75,7 @@ JarFile::JarFile(gchar const*new_filename) // 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() @@ -445,11 +445,11 @@ JarFile& JarFile::operator=(JarFile const& rhs) 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; -- cgit v1.2.3