]> jfr.im git - irc/atheme/atheme.git/commitdiff
libathemecore/help: Fix memory leak when a help file cannot be opened
authorAttila Molnar <redacted>
Wed, 17 Sep 2014 22:56:25 +0000 (00:56 +0200)
committerAttila Molnar <redacted>
Wed, 17 Sep 2014 22:56:25 +0000 (00:56 +0200)
CID: 1238966

libathemecore/help.c

index 4cb66691cbc6aa14e469fb1eea24d4f6c79151cb..9b83a32c4a226d8daaa028c8805a73260c116cc3 100644 (file)
@@ -157,6 +157,7 @@ void help_display_as_subcmd(sourceinfo_t *si, service_t *service, const char *su
                        if (!help_file)
                        {
                                command_fail(si, fault_nosuch_target, _("Could not get help file for \2%s\2."), command);
+                               free(ccommand);
                                return;
                        }