dajobe / raptor

Redland Raptor RDF syntax library
https://librdf.org/raptor/
Other
157 stars 62 forks source link

fix memory leak with format, meaning #21

Closed rhmccullough closed 9 years ago

rhmccullough commented 9 years ago

check just before return at end of function

dajobe commented 9 years ago

That causes a crash. You also need to ensure it doesn't get freed twice, by setting it to NULL it out in the body of the code, after you free it. This is why C is hard...

rhmccullough commented 9 years ago

Sorry. It seemed so simple & obvious, I didn't run all the tests. I won't make that mistake again.