Skip to content

Commit

Permalink
prevent double free of subsInfo->filter
Browse files Browse the repository at this point in the history
set subsInfo->filter only after checking validity. Otherwise a
'return -1' here would destroy the filter here and in destroy_subsinfo.
  • Loading branch information
kkaempf committed Sep 17, 2019
1 parent a77ead2 commit 97b46f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/wsman-soap-envelope.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,6 @@ wsman_parse_event_request(WsXmlDocH doc, WsSubscribeInfo * subsInfo,
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;
Expand All @@ -828,6 +827,7 @@ wsman_parse_event_request(WsXmlDocH doc, WsSubscribeInfo * subsInfo,
subsInfo->flags |= WSMAN_SUBSCRIPTION_SELECTORSET;
}
}
subsInfo->filter = wsman_f;
}

return 0;
Expand Down

0 comments on commit 97b46f9

Please sign in to comment.