summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b>2005-09-06 22:36:57 +0000
committerwr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b>2005-09-06 22:36:57 +0000
commit4fc007864d315524fd19ae10b32df6132d080d6d (patch)
tree18f9bea9497630e5a9c5a93f641d522708b57f15
parentef378930a187df25b6bcb487790df9a65632f7b8 (diff)
downloadvdr-plugin-muggle-4fc007864d315524fd19ae10b32df6132d080d6d.tar.gz
vdr-plugin-muggle-4fc007864d315524fd19ae10b32df6132d080d6d.tar.bz2
g++ 2.95 needs a copy constructor for mgSQLString - bad boy. And fix another memleak
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@821 e10066b5-e1e2-0310-b819-94efdf66514b
-rw-r--r--mg_db.c6
-rw-r--r--mg_db.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/mg_db.c b/mg_db.c
index 9f65e72..bb07afd 100644
--- a/mg_db.c
+++ b/mg_db.c
@@ -88,6 +88,11 @@ mgSQLString::mgSQLString(const char*s)
Init(s);
}
+mgSQLString::mgSQLString(const mgSQLString& s)
+{
+ Init(s.original());
+}
+
mgSQLString::mgSQLString(string s)
{
Init(s.c_str());
@@ -959,6 +964,7 @@ mgDb::getAlbum(const char *filename,const mgSQLString& c_album,
free(b);
asprintf(&b,"UPDATE album SET artist='Various Artists' WHERE cddbid=%s",result.quoted());
Execute(b);
+ free(b);
// here we could change all tracks.sourceid to result and delete
// the other album entries for this album, but that should only
// be needed if a pre 0.1.4 import has been done incorrectly, so we
diff --git a/mg_db.h b/mg_db.h
index 934d372..a0dca80 100644
--- a/mg_db.h
+++ b/mg_db.h
@@ -53,6 +53,7 @@ class mgSQLString {
mgSQLString(const char*s);
mgSQLString(string s);
mgSQLString(TagLib::String s);
+ mgSQLString(const mgSQLString& s);
~mgSQLString();
char *quoted() const;
char *unquoted() const;