X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.c;h=f462016b2e572f6a58691362cb52c9bdb280ea91;hp=1ca5db3c97aea79477fd935569e989de7052064d;hb=d5738d17b54186db8c9c7f119a03b58382ae9be4;hpb=dab27431eccead1ce255b3f82453a0a2e86e0163 diff --git a/command.c b/command.c index 1ca5db3c..f462016b 100644 --- a/command.c +++ b/command.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -13,6 +13,7 @@ #include #include #include +#include #include "para.h" #include "error.h" @@ -457,10 +458,8 @@ int com_help(struct rc4_context *rc4c, int argc, char * const * argv) } /* argument given for help */ cmd = get_cmd_ptr(argv[1], &handler); - if (!cmd) { - free(handler); + if (!cmd) return -E_BAD_CMD; - } perms = cmd_perms_itohuman(cmd->perms); ret = rc4_send_va_buffer(rc4c, "%s - %s\n\n"