summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--loader/modules.c5
-rw-r--r--loader/modules.h2
2 files changed, 5 insertions, 2 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;
}
diff --git a/loader/modules.h b/loader/modules.h
index 94e9f1665..fb8313438 100644
--- a/loader/modules.h
+++ b/loader/modules.h
@@ -5,7 +5,7 @@ typedef struct moduleDependency_s * moduleDeps;
int mlReadLoadedList(moduleList * list);
void mlFreeList(moduleList list);
-int mlLoadDeps(moduleDeps moduleDepList, const char * path);
+int mlLoadDeps(moduleDeps * moduleDepList, const char * path);
moduleDeps mlNewDeps(void);
int mlLoadModule(char * modName, moduleList modLoaded,
moduleDeps modDeps, int testing);