diff options
author | Ludovic Ferrandis <ludovic.ferrandis@intel.com> | 2013-07-01 15:24:31 +0200 |
---|---|---|
committer | Ludovic Ferrandis <ludovic.ferrandis@intel.com> | 2013-07-01 15:24:31 +0200 |
commit | 9bb4952d7c85a71ca4502bf1679ae7b18bd8e623 (patch) | |
tree | 3fb0683970c51e620f9fd99253f3a63e78c38dcd /libdleyna/renderer/upnp.c | |
parent | 4652933e4bfce7fb624abab6c0c9465cef3b6a89 (diff) | |
download | dleyna-renderer-9bb4952d7c85a71ca4502bf1679ae7b18bd8e623.tar.gz |
[Klockwork] NULL pointer may be dereferenced. (#25)
Fix issue #25: ip_address may be NULL and may be dereferenced.
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
Diffstat (limited to 'libdleyna/renderer/upnp.c')
-rw-r--r-- | libdleyna/renderer/upnp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libdleyna/renderer/upnp.c b/libdleyna/renderer/upnp.c index 5c10d98..6b7ab90 100644 --- a/libdleyna/renderer/upnp.c +++ b/libdleyna/renderer/upnp.c @@ -248,12 +248,12 @@ static void prv_server_unavailable_cb(GUPnPControlPoint *cp, udn = gupnp_device_info_get_udn((GUPnPDeviceInfo *)proxy); - if (!udn) - goto on_error; - ip_address = gupnp_context_get_host_ip( gupnp_control_point_get_context(cp)); + if (!udn || !ip_address) + goto on_error; + DLEYNA_LOG_DEBUG("UDN %s", udn); DLEYNA_LOG_DEBUG("IP Address %s", ip_address); |