diff options
author | Ludovic Ferrandis <ludovic.ferrandis@intel.com> | 2013-07-01 15:23:36 +0200 |
---|---|---|
committer | Ludovic Ferrandis <ludovic.ferrandis@intel.com> | 2013-07-01 15:23:36 +0200 |
commit | 4652933e4bfce7fb624abab6c0c9465cef3b6a89 (patch) | |
tree | 19b0169bef24bb022ae059c41f3a6dd1a395e5ec | |
parent | cf93ccd162e1954dd87d4351ab42f5627393a443 (diff) | |
download | dleyna-renderer-4652933e4bfce7fb624abab6c0c9465cef3b6a89.tar.gz |
[Klockwork] NULL pointer may be dereferenced. (#24)
Fix issue #24: ip_address may be NULL and may be dereferenced.
Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
-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 ee45166..5c10d98 100644 --- a/libdleyna/renderer/upnp.c +++ b/libdleyna/renderer/upnp.c @@ -162,12 +162,12 @@ static void prv_server_available_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); |