Fix service discovery add

Change-Id: If621eef6e7a16c83ae520650b8216a5f63488403
diff --git a/src/p2p/p2p_sd.c b/src/p2p/p2p_sd.c
index 9e3588a..4e5a2e5 100644
--- a/src/p2p/p2p_sd.c
+++ b/src/p2p/p2p_sd.c
@@ -841,6 +841,7 @@
 		      const struct wpabuf *tlvs)
 {
 	struct p2p_sd_query *q;
+	struct p2p_device *dev;
 
 	q = os_zalloc(sizeof(*q));
 	if (q == NULL)
@@ -859,6 +860,14 @@
 
 	q->next = p2p->sd_queries;
 	p2p->sd_queries = q;
+
+	dl_list_for_each(dev, &p2p->devices, struct p2p_device, list) {
+		if (dst == NULL ||
+			os_memcmp(dev->info.p2p_device_addr, dst, ETH_ALEN) == 0) {
+			dev->flags &= ~P2P_DEV_SD_INFO;
+		}
+	}
+
 	wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Added SD Query %p", q);
 
 	return q;