tfix free call placement - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
(HTM) git clone git://src.adamsgaard.dk/sphere
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit e4799632a4c3fb2f952bf237bd126a4f505fb4ec
(DIR) parent ab80b8c303afb3c956769acbecce59f7d0e7e91c
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Mon, 12 May 2014 09:56:50 +0200
fix free call placement
Diffstat:
M src/sphere_status.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/src/sphere_status.c b/src/sphere_status.c
t@@ -52,15 +52,16 @@ int main(int argc, char *argv[])
(void)open_status_file(cwd, namelist[i]->d_name, 1);
puts("");
}
+ free(namelist[i]);
}
- free(namelist[n]);
+ free(namelist);
}
- free(namelist);
return 0;
}
-
- return open_status_file(cwd, argv[1], 0);
+ int ret = open_status_file(cwd, argv[1], 0);
+ free(cwd);
+ return ret;
}
int print_usage(FILE* stream, char* argv0, int return_status)