projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix segfault
[apps/madmutt.git]
/
init.c
diff --git
a/init.c
b/init.c
index
cb580c5
..
ab1e583
100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-436,7
+436,7
@@
static int rx_from_string (struct option_t* dst, const char* val,
}
if (!((rx_t*) dst->data))
}
if (!((rx_t*) dst->data))
- *((rx_t**) dst->data) =
mem_calloc (1, sizeof(rx_t)
);
+ *((rx_t**) dst->data) =
p_new(rx_t, 1
);
p = (rx_t*) dst->data;
p = (rx_t*) dst->data;
@@
-642,7
+642,7
@@
static void add_to_list (LIST ** list, const char *str)
}
if (!*list || last) {
}
if (!*list || last) {
- t =
(LIST *) mem_calloc (1, sizeof(LIST)
);
+ t =
p_new(LIST, 1
);
t->data = str_dup (str);
if (last) {
last->next = t;
t->data = str_dup (str);
if (last) {
last->next = t;
@@
-1431,7
+1431,7
@@
static int parse_alias (BUFFER * buf, BUFFER * s, unsigned long data,
if (!tmp) {
/* create a new alias */
if (!tmp) {
/* create a new alias */
- tmp =
(ALIAS *) mem_calloc (1, sizeof(ALIAS)
);
+ tmp =
p_new(ALIAS, 1
);
tmp->self = tmp;
tmp->name = str_dup (buf->data);
/* give the main addressbook code a chance */
tmp->self = tmp;
tmp->name = str_dup (buf->data);
/* give the main addressbook code a chance */
@@
-1602,7
+1602,7
@@
static void mutt_set_default(const char *name, void* p, unsigned long more)
static struct option_t* add_option (const char* name, const char* init,
short type, short dodup) {
static struct option_t* add_option (const char* name, const char* init,
short type, short dodup) {
- struct option_t* option =
mem_calloc (1, sizeof(struct option_t)
);
+ struct option_t* option =
p_new(struct option_t, 1
);
debug_print (1, ("adding $%s\n", name));
debug_print (1, ("adding $%s\n", name));