fixed segfault with duplicate properties

diff --git a/src/wsman.c b/src/wsman.c
index dddc69d..0bafea8 100644
--- a/src/wsman.c
+++ b/src/wsman.c
@@ -478,9 +478,14 @@
 	while (properties != NULL && properties[c] != NULL) {
 		char *cc[3];
 		u_tokenize1(cc, 2, properties[c], '=');
-		if (!hash_alloc_insert(h, cc[0], cc[1])) {
-			debug("hash_alloc_insert failed");
-		}
+		if (!hash_lookup(h, cc[0])) {
+			if (!hash_alloc_insert(h, cc[0], cc[1])) {
+				debug("hash_alloc_insert failed");
+			}
+		} else {
+			warn("duplicate not added to hash");
+		}		
+
 		c++;
 	}
 	return h;