diff options
| author | Roy Marples <roy@marples.name> | 2017-09-08 20:47:41 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2017-09-08 20:47:41 +0100 |
| commit | 512e5bb35e04788f04734f3f24b1cf77980c66f0 (patch) | |
| tree | fbdaf361aec43d2728174fd87ab84d235e0fda12 | |
| parent | f9a38b3c14db3cfb14d50df4bd861afca88539ba (diff) | |
| download | dhcpcd-ui-512e5bb35e04788f04734f3f24b1cf77980c66f0.tar.xz | |
Fix prior
| -rw-r--r-- | src/libdhcpcd/wpa.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libdhcpcd/wpa.c b/src/libdhcpcd/wpa.c index c7e57db..baf674b 100644 --- a/src/libdhcpcd/wpa.c +++ b/src/libdhcpcd/wpa.c @@ -104,9 +104,11 @@ wpa_open(const char *ifname, char **path) out: free(pwdbuf); free(tmpdir); + if (r == 0) + return fd; if (fd != -1) close(fd); - if (r != 0 && *path != NULL) { + if (*path != NULL) { unlink(*path); free(*path); *path = NULL; |
