diff options
author | Nikias Bassen | 2019-03-23 20:22:51 +0100 |
---|---|---|
committer | Nikias Bassen | 2019-03-23 20:22:51 +0100 |
commit | 873252dc8b4e469c7dc692064ac616104fca5f65 (patch) | |
tree | 1ba1963ba7aa2c0e5661a8be7ea32fb0d2bd5803 /src/libusbmuxd.c | |
parent | dc90b02fa522c7c10d91715303d2fdec2da41005 (diff) | |
download | libusbmuxd-873252dc8b4e469c7dc692064ac616104fca5f65.tar.gz libusbmuxd-873252dc8b4e469c7dc692064ac616104fca5f65.tar.bz2 |
Fix Segmentation Fault when UDID parsing failed by bailing out in case of error
Fixes #63.
Diffstat (limited to 'src/libusbmuxd.c')
-rw-r--r-- | src/libusbmuxd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c index 62af3e2..4a52f67 100644 --- a/src/libusbmuxd.c +++ b/src/libusbmuxd.c @@ -271,7 +271,7 @@ static usbmuxd_device_info_t *device_info_from_plist(plist_t props) if (!devinfo->udid[0]) { LIBUSBMUXD_ERROR("%s: Failed to get SerialNumber (UDID)!\n", __func__); free(devinfo); - devinfo = NULL; + return NULL; } if (!devinfo->conn_type) { LIBUSBMUXD_ERROR("%s: Failed to get ConnectionType!\n", __func__); |