diff options
Diffstat (limited to 'loader/modules.c')
-rw-r--r-- | loader/modules.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/loader/modules.c b/loader/modules.c index 9178a6708..ef056e08b 100644 --- a/loader/modules.c +++ b/loader/modules.c @@ -77,13 +77,14 @@ moduleDeps mlNewDeps(void) { return md; } -int mlLoadDeps(moduleDeps moduleDepList, const char * path) { +int mlLoadDeps(moduleDeps * moduleDepListPtr, const char * path) { int fd; char * buf; struct stat sb; char * start, * end, * chptr; int i, numItems; moduleDeps nextDep; + moduleDeps moduleDepList = *moduleDepListPtr; fd = open(path, O_RDONLY); if (fd < 0) { @@ -151,6 +152,8 @@ int mlLoadDeps(moduleDeps moduleDepList, const char * path) { moduleDepList = realloc(moduleDepList, sizeof(*moduleDepList) * (nextDep - moduleDepList + 1)); + *moduleDepListPtr = moduleDepList; + return 0; } |