From: Daniel Carl Date: Sat, 6 Sep 2014 22:59:41 +0000 (+0200) Subject: Fixed possible use of uninitialized variable. X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=00a0a505b7b6540c78f8e73cb693baf06e53157a;p=vimb.git Fixed possible use of uninitialized variable. --- diff --git a/src/autocmd.c b/src/autocmd.c index e5b4e10..97fc154 100644 --- a/src/autocmd.c +++ b/src/autocmd.c @@ -145,7 +145,7 @@ gboolean autocmd_add(char *name, gboolean delete) guint bits; char *parse, *word, *pattern, *excmd; GSList *item; - AuGroup *grp; + AuGroup *grp = NULL; parse = name; @@ -222,7 +222,7 @@ gboolean autocmd_add(char *name, gboolean delete) } /* add the new autocmd */ - if (excmd) { + if (excmd && grp) { AutoCmd *cmd = new_autocmd(excmd, pattern); cmd->bits = bits;