commit - 8182bd343dfc2c182dd3ac5384515785d531bf2b
commit + e227880da6b6dbda2bf5abdb2156003ec64a733e
blob - 16847fa180829d337e301ad16215cee73b512e26
blob + e0e53c34d3bd7b4b8eda506a82b4b89c8ba4ef36
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
errored:
free(dir_test);
if (opened)
- closedir(dt);
+ if (d && closedir(dt) == -1 && error == NULL)
+ error = got_error_from_errno("closedir");
return error;
}
}
}
done:
- closedir(d);
+ if (d && closedir(d) == -1 && error == NULL)
+ error = got_error_from_errno("closedir");
return error;
}