projects
/
suckless
/
dwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a72dc2f
)
die if malloc sizeof(Monitor) fails
author
Anselm R Garbe
<garbeam@gmail.com>
Wed, 8 Jul 2009 15:05:36 +0000
(16:05 +0100)
committer
Anselm R Garbe
<garbeam@gmail.com>
Wed, 8 Jul 2009 15:05:36 +0000
(16:05 +0100)
dwm.c
patch
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index c0a15cc0a8c9624ca2481a53609863d82830a70f..267659f3835c9da586a022f170280e4229beaa80 100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-1693,7
+1693,8
@@
updategeom(void) {
#endif /* XINERAMA */
/* allocate monitor(s) for the new geometry setup */
for(i = 0; i < n; i++) {
- m = (Monitor *)malloc(sizeof(Monitor));
+ if(!(m = (Monitor *)malloc(sizeof(Monitor))))
+ die("fatal: could not malloc() %u bytes\n", sizeof(Monitor));
m->next = newmons;
newmons = m;
}