summaryrefslogtreecommitdiff
path: root/lib/Exceptions.cc
diff options
context:
space:
mode:
authorPixel <Pixel>2002-01-10 14:15:35 +0000
committerPixel <Pixel>2002-01-10 14:15:35 +0000
commit53de7397c5d9cfcbf480f122a379f077345f8ba8 (patch)
treef8061c3fe184c635d2fa419ed039e0611a11063f /lib/Exceptions.cc
parent692672cd414addadfe666904c10d4492a7fcbe17 (diff)
Better duplicating handling...
Diffstat (limited to 'lib/Exceptions.cc')
-rw-r--r--lib/Exceptions.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Exceptions.cc b/lib/Exceptions.cc
index 1283f6a..7c9d318 100644
--- a/lib/Exceptions.cc
+++ b/lib/Exceptions.cc
@@ -118,6 +118,13 @@ void xfree(void *& p) {
}
}
+void xfree(char *& p) {
+ if (p) {
+ ::free(p - sizeof(size_t));
+ p = 0;
+ }
+}
+
int xpipe(int * p, int flag) throw (GeneralException) {
if (pipe(p)) {
throw GeneralException(String(_("Error creating pipe: ")) + strerror(errno));