SWI-Prolog / packages-semweb

The SWI-Prolog RDF store
28 stars 14 forks source link

Avoid uninitialized olds in read_blank_note_property_list #111

Closed mgondan closed 6 months ago

mgondan commented 6 months ago

I get a warning that olds is maybe uninitialized in this function.

I don't fully understand the code, but if set_anon_subject fails (out of memory), then olds is indeed uninitialized. Either initialize olds = NULL, or check rc before set_subject. I am unsure about both alternatives, please see the comments in the suggested fix.

JanWielemaker commented 6 months ago

Thanks! Edited to only initialize and removed comments. Think that is ok.