[hackers] [wmii] Fix crash on systems with pedantic mallocs (needed another * in malloc. Thank you valgrind).

From: Kris Maglione <jg_AT_suckless.org>
Date: Mon Jan 21 08:36:28 2008

changeset: 2247:bc0c0c49f781
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Mon Jan 21 02:35:11 2008 -0500
summary: Fix crash on systems with pedantic mallocs (needed another * in malloc. Thank you valgrind).

diff -r 4b4844b25103 -r bc0c0c49f781 cmd/wmii/rule.c
--- a/cmd/wmii/rule.c Mon Jan 21 01:21:37 2008 -0500
+++ b/cmd/wmii/rule.c Mon Jan 21 02:35:11 2008 -0500
@@ -88,7 +88,7 @@ update_rules(Rule **rule, const char *da
                         if(c == '\n' || c == '#' || c == 0) {
                                 *v = 0;
                                 trim(value, " \t/");
- *rule = emallocz(sizeof *rule);
+ *rule = emallocz(sizeof **rule);
                                 (*rule)->regex = regcomp(regex);
                                 if((*rule)->regex) {
                                         utflcpy((*rule)->value, value, sizeof(rul->value));
Received on Mon Jan 21 2008 - 08:36:28 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:59:05 UTC