diff options
| author | Roy Marples <roy@marples.name> | 2016-02-16 09:54:29 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-02-16 09:54:29 +0000 |
| commit | ce66b1e5ed45df99a8fb770fc2dbd8510a6fe921 (patch) | |
| tree | 77f2b52b966f971def7a78c8c98f9fec60691a0f /ipv6.c | |
| parent | 289562ab9452ca26d7da2053e1e8b47141823a5e (diff) | |
| download | dhcpcd-ce66b1e5ed45df99a8fb770fc2dbd8510a6fe921.tar.xz | |
Set fp to NULL after fclose() to avoid a potential secondary fclose() if the
first call failed.
Fixes [a4c18d501a].
Diffstat (limited to 'ipv6.c')
| -rw-r--r-- | ipv6.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -228,6 +228,7 @@ ipv6_readsecret(struct dhcpcd_ctx *ctx) hwaddr_ntoa(ctx->secret, ctx->secret_len, line, sizeof(line))); if (fclose(fp) == EOF) x = -1; + fp = NULL; if (x > 0) return (ssize_t)ctx->secret_len; |
