]> jfr.im git - irc/kvirc/KVIrc.git/commitdiff
KviKvsParser: Fix potential memory leak
authorIceN9ne <redacted>
Mon, 23 Apr 2018 01:11:56 +0000 (21:11 -0400)
committerIceN9ne <redacted>
Mon, 23 Apr 2018 01:11:56 +0000 (21:11 -0400)
src/kvirc/kvs/parser/KviKvsParser_lside.cpp

index fbff809b35456fb4552afb0e80225f4c141e3e9f..1c9c9d500f3cd202a5710fb72b1789b6a661e5b8 100644 (file)
@@ -627,6 +627,7 @@ KviKvsTreeNodeOperation * KviKvsParser::parseBindingOperation()
        {
                error(KVSP_curCharPointer, __tr2qs_ctx("Unexpected end of command in binding operation, at least one slash is missing", "kvs"));
                delete pFirst;
+               delete pSecond;
                return nullptr;
        }
 
@@ -634,6 +635,7 @@ KviKvsTreeNodeOperation * KviKvsParser::parseBindingOperation()
        {
                error(KVSP_curCharPointer, __tr2qs_ctx("Found character '%q' (Unicode %x) where a slash '/' was expected", "kvs"), KVSP_curCharPointer, KVSP_curCharUnicode);
                delete pFirst;
+               delete pSecond;
                return nullptr;
        }