Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
avoid a free on an uninitialized variable by setting optval to NULL.
[spectrwm.git]
/
spectrwm.c
diff --git
a/spectrwm.c
b/spectrwm.c
index
16cb8b3
..
132743f
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-7226,7
+7226,7
@@
int
conf_load(const char *filename, int keymapping)
{
FILE *config;
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;
size_t linelen, lineno = 0;
int wordlen, i, optidx;
struct config_option *opt = NULL;
@@
-7246,8
+7246,8
@@
conf_load(const char *filename, int keymapping)
if (line)
free(line);
if (line)
free(line);
- if ((line = fparseln(config, &linelen, &lineno, NULL, 0))
- == NULL) {
+ if ((line = fparseln(config, &linelen, &lineno, NULL,
+ FPARSELN_UNESCCOMM | FPARSELN_UNESCCONT)) == NULL) {
if (ferror(config))
err(1, "%s", filename);
else
if (ferror(config))
err(1, "%s", filename);
else
@@
-8209,7
+8209,7
@@
enternotify(xcb_enter_notify_event_t *e)
/* If no windows on pointer region, then focus root. */
r = root_to_region(e->root, SWM_CK_POINTER);
if (r == NULL) {
/* If no windows on pointer region, then focus root. */
r = root_to_region(e->root, SWM_CK_POINTER);
if (r == NULL) {
- DNPRINTF(SWM_D_EVENT, "enterntoify: "
+ DNPRINTF(SWM_D_EVENT, "enternotify: "
"NULL region; ignoring.\n");
return;
}
"NULL region; ignoring.\n");
return;
}
@@
-8224,7
+8224,7
@@
enternotify(xcb_enter_notify_event_t *e)
focus_win(get_focus_magic(win));
}
focus_win(get_focus_magic(win));
}
- focus_flush();
+ xcb_flush(conn);
}
#ifdef SWM_DEBUG
}
#ifdef SWM_DEBUG