diff options
Diffstat (limited to 'lib/Exceptions.cc')
-rw-r--r-- | lib/Exceptions.cc | 7 |
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)); |