prevent double free of subsInfo->filter
set subsInfo->filter only after checking validity. Otherwise a
'return -1' here would destroy the filter here and in destroy_subsinfo.
diff --git a/src/lib/wsman-soap-envelope.c b/src/lib/wsman-soap-envelope.c
index a89d0a8..050f573 100644
--- a/src/lib/wsman-soap-envelope.c
+++ b/src/lib/wsman-soap-envelope.c
@@ -808,7 +808,6 @@
if (!wsman_f)
wsman_f = wse_f;
- subsInfo->filter = wsman_f;
if (wsman_f) {
if (strcmp(wsman_f->dialect, WSM_CQL_FILTER_DIALECT) == 0)
subsInfo->flags |= WSMAN_SUBSCRIPTION_CQL;
@@ -828,6 +827,7 @@
subsInfo->flags |= WSMAN_SUBSCRIPTION_SELECTORSET;
}
}
+ subsInfo->filter = wsman_f;
}
return 0;