Commit 7746f2f6 authored by Philip Withnall's avatar Philip Withnall Committed by Daniel Veillard

xmlcatalog: Fix a memory leak on quit

Coverity issue: #60442

https://bugzilla.gnome.org/show_bug.cgi?id=731990
parent 579ebbcb
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment