Bump to libxml2 2.9.4
[platform/upstream/libxml2.git] / xmlcatalog.c
index 43f455a..006f0cc 100644 (file)
@@ -80,6 +80,7 @@ xmlShellReadline(const char *prompt) {
 
     if (prompt != NULL)
        fprintf(stdout, "%s", prompt);
+    fflush(stdout);
     if (!fgets(line_read, 500, stdin))
         return(NULL);
     line_read[500] = 0;
@@ -181,12 +182,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");