From a5f2e96ae60923892d2f9a8afe9c41ddf90df3da Mon Sep 17 00:00:00 2001 From: Rick L Bird Date: Sun, 17 Apr 2011 04:25:14 -0400 Subject: [PATCH] As commented bad malloc'ing should be a panic refs #3 --- src/modules.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules.c b/src/modules.c index ba63447..070ace5 100644 --- a/src/modules.c +++ b/src/modules.c @@ -26,9 +26,8 @@ struct module_entry_t *module_entry_add(char *name) { entry = (struct module_entry_t *) mush_malloc(sizeof(struct module_entry_t), "MODULE_ENTRY"); - if(!entry) { - return NULL; /* Should really panic here.. */ - } + if(!entry) + mush_panic("Could not allocate MODULE_ENTRY"); entry->name = mush_strdup(name, "MODULE_ENTRY.NAME"); entry->info = NULL; -- 2.30.2