summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/error.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-04-16 01:10:09 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-04-16 01:10:09 +0200
commit6070a3461841d4398d731fcb33792d55779111f1 (patch)
tree2b7217a5d542202040e8abdcf2eb5d52a32efd90 /apt-pkg/contrib/error.cc
parent949e033cb7c741b9eed459c0e93a89a92acb168d (diff)
fix a bunch of cppcheck warnings/errors based on a patch by
Niels Thykier, thanks! (Closes: #622805)
Diffstat (limited to 'apt-pkg/contrib/error.cc')
-rw-r--r--apt-pkg/contrib/error.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/contrib/error.cc b/apt-pkg/contrib/error.cc
index fe50e606b..18810d2a4 100644
--- a/apt-pkg/contrib/error.cc
+++ b/apt-pkg/contrib/error.cc
@@ -107,6 +107,7 @@ bool GlobalError::InsertErrno(MsgType type, const char* Function,
msgSize = n + 1;
else
msgSize *= 2;
+ free(S);
return true;
}
@@ -160,6 +161,7 @@ bool GlobalError::Insert(MsgType type, const char* Description,
msgSize = n + 1;
else
msgSize *= 2;
+ free(S);
return true;
}