commit - ecf6e46eb15fefb32da8d87c34db1c6983368cc2
commit + bb5dcc10ceb4a956d322cbd7523d3421e80df2e3
blob - 813bce5919460541ece9d709acdba5d247b1a361
blob + f4be6a468e5dcbe30919264e204784c7d766e578
--- lib/diffreg.c
+++ lib/diffreg.c
}
if (flags & D_EMPTY1) {
f1 = fopen(_PATH_DEVNULL, "r");
- if (f1 == NULL)
- return got_error_from_errno();
+ if (f1 == NULL) {
+ err = got_error_from_errno();
+ goto closem;
+ }
}
else if (f1 == NULL) {
args->status |= 2;
if (flags & D_EMPTY2) {
f2 = fopen(_PATH_DEVNULL, "r");
- if (f2 == NULL)
- return got_error_from_errno();
+ if (f2 == NULL) {
+ err = got_error_from_errno();
+ goto closem;
+ }
} else if (f2 == NULL) {
args->status |= 2;
goto closem;