summaryrefslogtreecommitdiff
path: root/xmlcatalog.c
diff options
context:
space:
mode:
Diffstat (limited to 'xmlcatalog.c')
-rw-r--r--xmlcatalog.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/xmlcatalog.c b/xmlcatalog.c
index 43f455a..b9ed6a4 100644
--- a/xmlcatalog.c
+++ b/xmlcatalog.c
@@ -181,12 +181,13 @@ static void usershell(void) {
/*
* start interpreting the command
*/
- if (!strcmp(command, "exit"))
- break;
- if (!strcmp(command, "quit"))
- break;
- if (!strcmp(command, "bye"))
+ if (!strcmp(command, "exit") ||
+ !strcmp(command, "quit") ||
+ !strcmp(command, "bye")) {
+ free(cmdline);
break;
+ }
+
if (!strcmp(command, "public")) {
if (nbargs != 1) {
printf("public requires 1 arguments\n");