fix use of uninitialsed variable and associated crash

This commit is contained in:
Mark 2005-08-26 21:46:29 +00:00
parent f7ba040582
commit 4b06462b75

3
blsb.c
View file

@ -306,7 +306,6 @@ int blsb_cmd_add( CmdParams* cmdparams )
dom_list *dl; dom_list *dl;
lnode_t *lnode; lnode_t *lnode;
int type; int type;
char *name;
char *msg; char *msg;
if( list_isfull( blsb.domains ) ) if( list_isfull( blsb.domains ) )
@ -330,7 +329,7 @@ int blsb_cmd_add( CmdParams* cmdparams )
dl = lnode_get( lnode ); dl = lnode_get( lnode );
if( ( !ircstrcasecmp( dl->name, cmdparams->av[2] ) ) || ( !ircstrcasecmp(dl->domain, cmdparams->av[0] ) ) ) if( ( !ircstrcasecmp( dl->name, cmdparams->av[2] ) ) || ( !ircstrcasecmp(dl->domain, cmdparams->av[0] ) ) )
{ {
irc_prefmsg( blsb_bot, cmdparams->source, "%s %s already has an entry", cmdparams->av[0], name ); irc_prefmsg( blsb_bot, cmdparams->source, "%s already has an entry", cmdparams->av[0] );
ns_free( name ); ns_free( name );
return NS_SUCCESS; return NS_SUCCESS;
} }