]> code.delx.au - spectrwm/commitdiff
avoid a free on an uninitialized variable by setting optval to NULL.
authorDavid Hill <dhill@conformal.com>
Sun, 11 Nov 2012 14:14:15 +0000 (09:14 -0500)
committerDavid Hill <dhill@conformal.com>
Sun, 11 Nov 2012 14:14:15 +0000 (09:14 -0500)
spectrwm.c

index a565162aec00cea1fae1f9257bbba4d4f3d2a145..132743fa21014e43f26cda140826c1e5390477a2 100644 (file)
@@ -7226,7 +7226,7 @@ int
 conf_load(const char *filename, int keymapping)
 {
        FILE                    *config;
-       char                    *line = NULL, *cp, *optsub, *optval;
+       char                    *line = NULL, *cp, *optsub, *optval = NULL;
        size_t                  linelen, lineno = 0;
        int                     wordlen, i, optidx;
        struct config_option    *opt = NULL;