diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2009-11-11 17:35:47 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-11-11 17:35:47 -0800 |
commit | caa466ad3edd1d6996806cc8f0f70af43ee8f509 (patch) | |
tree | 537ec899ad5b27629b1cfefe0169d1a629b2968d | |
parent | 4c23cb0c024c3573b8fa8a77d9c109657f329543 (diff) | |
parent | 899d317e4055907075c6adf713bf9d1fe500c5f1 (diff) | |
download | wpa_supplicant-caa466ad3edd1d6996806cc8f0f70af43ee8f509.tar.gz |
am 899d317e: am be5cce4a: Check if interface is valid in wpa_ctrl_close()
Merge commit '899d317e4055907075c6adf713bf9d1fe500c5f1'
* commit '899d317e4055907075c6adf713bf9d1fe500c5f1':
Check if interface is valid in wpa_ctrl_close()
-rw-r--r-- | wpa_ctrl.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -140,8 +140,11 @@ struct wpa_ctrl * wpa_ctrl_open(const char *ctrl_path) void wpa_ctrl_close(struct wpa_ctrl *ctrl) { + if (ctrl == NULL) + return; unlink(ctrl->local.sun_path); - close(ctrl->s); + if (ctrl->s >= 0) + close(ctrl->s); os_free(ctrl); } |