# HG changeset patch # User misc@mandriva.org # Date 1168695487 -3600 # Node ID 771eb6aa2d4181af5f4687efc7815d29f46c9e70 # Parent 2ac9bec53c37cd044c304f6a38b0bb1f21f901e7 Fix another memory leak, spotted by valgrind diff -r 2ac9bec53c37 -r 771eb6aa2d41 mcabber/src/commands.c --- a/mcabber/src/commands.c Sat Jan 13 14:36:05 2007 +0100 +++ b/mcabber/src/commands.c Sat Jan 13 14:38:07 2007 +0100 @@ -367,9 +367,12 @@ // Command "quit"? if ((scr_get_multimode() != 2) - && (!strncasecmp(xpline, mkcmdstr("quit"), strlen(mkcmdstr("quit"))))) - if (!xpline[5] || xpline[5] == ' ') + && (!strncasecmp(xpline, mkcmdstr("quit"), strlen(mkcmdstr("quit"))))) { + if (!xpline[5] || xpline[5] == ' ') { + g_free(xpline); return 255; + } + } // If verbatim multi-line mode, we check if another /msay command is typed if ((scr_get_multimode() == 2)