From 2e71d6ab9c82ecdd7c1dd9e864b861fa218b95b3 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Wed, 25 Jul 2012 16:05:52 +0000 Subject: [PATCH] + small reorg. of the code --- src/installer/kiwix-install.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/installer/kiwix-install.cpp b/src/installer/kiwix-install.cpp index b40e1cf..9054103 100644 --- a/src/installer/kiwix-install.cpp +++ b/src/installer/kiwix-install.cpp @@ -51,7 +51,6 @@ int main(int argc, char **argv) { int option_index = 0; int c = 0; supportedBackend backend = XAPIAN; - kiwix::Reader *reader; /* Argument parsing */ while (42) { @@ -119,7 +118,8 @@ int main(int argc, char **argv) { /* Check if this is a ZIM file */ try { - reader = new kiwix::Reader(contentPath); + kiwix::Reader *reader = new kiwix::Reader(contentPath); + delete reader; } catch (exception &e) { cerr << "The content available at '" << contentPath << "' is not a ZIM file." << endl; exit(1);