Skip to content
Browse files

...Part 6: Use 'dlclose' if there was an error looking up the initial…

…izing function.
  • Loading branch information...
1 parent 11749a2 commit a3a1d319df1cd34b973985390ee418ed57728497 @orangea orangea committed Dec 20, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 core/load.c
View
1 core/load.c
@@ -79,6 +79,7 @@ void potion_load_dylib(Potion *P, const char *filename) {
err = dlerror();
if (err != NULL) {
fprintf(stderr, "** error loading %s: %s\n", filename, err);
+ dlclose(handle);
return;
}
func(P);

0 comments on commit a3a1d31

Please sign in to comment.
Something went wrong with that request. Please try again.