Blob Blame History Raw
From 4844bf5e8cae8a16e7e9adc7e004bac60f52dba3 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@freedesktop.org>
Date: Thu, 15 Sep 2016 16:30:26 +0200
Subject: [PATCH] Avoid any attempts to delete the same dlr_upnp_t twice

It is a good idea to NULLify g_context.upnp to avoid any possibility of
a crash due to double-free.

https://bugzilla.redhat.com/show_bug.cgi?id=1251366
---
 libdleyna/renderer/server.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libdleyna/renderer/server.c b/libdleyna/renderer/server.c
index e15c32682348..3879ff5e152c 100644
--- a/libdleyna/renderer/server.c
+++ b/libdleyna/renderer/server.c
@@ -723,6 +723,7 @@ static void prv_control_point_stop_service(void)
 	if (g_context.upnp) {
 		dlr_upnp_unsubscribe(g_context.upnp);
 		dlr_upnp_delete(g_context.upnp);
+		g_context.upnp = NULL;
 	}
 
 	if (g_context.connection) {
-- 
2.7.4