Skip to content

Commit

Permalink
Lint: check for file instead of NOT_FOUND
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtsfrei committed Dec 5, 2024
1 parent fe9d1e4 commit 4758a47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/install-openvas-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apt-get update && apt-get install --no-install-recommends --no-install-suggests
libbsd-dev \
libgnutls30 \
libgssapi3-heimdal \
libkrb5-26-heimdal \
libkrb5-dev \
libasn1-8-heimdal \
libroken19-heimdal \
libhdb9-heimdal \
Expand Down
4 changes: 2 additions & 2 deletions misc/openvas-krb5.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ o_krb5_find_kdc (const OKrb5Credential *creds, char **kdc)
int state = 0;
size_t last_element;
size_t i, j;
FILE *file;
FILE *file = NULL;

// we don't know if we should free it or just override it.
// aborting instead.
Expand Down Expand Up @@ -162,7 +162,7 @@ o_krb5_find_kdc (const OKrb5Credential *creds, char **kdc)
}

result:
if (result != O_KRB5_CONF_NOT_FOUND)
if (file != NULL)
{
fclose (file);
}
Expand Down

0 comments on commit 4758a47

Please sign in to comment.