projects
/
cobramush.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58eb32a
)
As commented bad malloc'ing should be a panic refs #3
author
Rick L Bird
<nveid@yahoo.com>
Sun, 17 Apr 2011 08:25:14 +0000
(
04:25
-0400)
committer
Rick L Bird
<nveid@yahoo.com>
Sun, 17 Apr 2011 08:25:14 +0000
(
04:25
-0400)
src/modules.c
patch
|
blob
|
history
diff --git
a/src/modules.c
b/src/modules.c
index ba63447e2170f51da2c6ecfdb78a93e5f36e5c07..070ace51729b62b37a657f561e161a1eed854b52 100644
(file)
--- 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;