From 4652933e4bfce7fb624abab6c0c9465cef3b6a89 Mon Sep 17 00:00:00 2001 From: Ludovic Ferrandis Date: Mon, 1 Jul 2013 15:23:36 +0200 Subject: [Klockwork] NULL pointer may be dereferenced. (#24) Fix issue #24: ip_address may be NULL and may be dereferenced. Signed-off-by: Ludovic Ferrandis --- libdleyna/renderer/upnp.c | 6 +++--- 1 file 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); -- cgit v1.2.1